If you have only a few categories, you can create a separate rule for each possible combination of yes's and no's, for example if you have only two categories, your set of rules would look like this:
"cat1" = 'yes' AND "cat2" = 'yes'
"cat1" = 'yes' AND "cat2" = 'no'
"cat1" = 'no' AND "cat2" = 'yes'
"cat1" = 'no' AND "cat2" = 'no'
The number of possible combinations is the square of the number of categories (3 categories = 9 combos; 4 categories = 16 combos; 5 categories = 25 combos; etc.). This quickly becomes an unmanageable number of combinations. So a more automated solution would be best with more than 4 categories.
Let's set this up with nested rules. The larger rules will group categories by how many different 'yes' categories they have. A true/false statement like ("cat1" = 'yes')
will evaluate to 1 when true, 0 when false. So a sum like this:
("cat1" = 'yes') + ("cat2" = 'yes') + ("cat3" = 'yes') + ("cat4" = 'yes')
will give a count of how many of the categories say 'yes'. Create 5 rules without symbols, like so:
("cat1" = 'yes') + ("cat2" = 'yes') + ("cat3" = 'yes') + ("cat4" = 'yes') = 1
("cat1" = 'yes') + ("cat2" = 'yes') + ("cat3" = 'yes') + ("cat4" = 'yes') = 2
("cat1" = 'yes') + ("cat2" = 'yes') + ("cat3" = 'yes') + ("cat4" = 'yes') = 3
("cat1" = 'yes') + ("cat2" = 'yes') + ("cat3" = 'yes') + ("cat4" = 'yes') = 4
ELSE
Nest 4 rules under the first rule, with simple fill style:
"cat1" = 'yes'
"cat2" = 'yes'
"cat3" = 'yes'
"cat4" = 'yes'
Choose the colors you want. Save the colors as swatches to make them easy to access in the following steps.
Right-click on the second rule > Refine Current Rule > Add Categories to rule. Create a style with two stripes.
- Line pattern fill, set line width to 1/2 the value you choose for line spacing.
- Add a second layer to the simple line (under line pattern fill). Use the same line width as the first layer; use the same number for "offset".
Add 5 styles, then return to the main style panel screen. Change the rules as follows:
("cat1" = 'yes') and ("cat2" = 'yes')
("cat1" = 'yes') and ("cat3" = 'yes')
("cat1" = 'yes') and ("cat4" = 'yes')
("cat2" = 'yes') and ("cat3" = 'yes')
("cat3" = 'yes') and ("cat4" = 'yes')
Change the stripe colors to match the colors you used for the single-category group. Use color swatches to get exactly the same color.
Repeat for the 3-category and 4-category groups.