I have a layer which contains 12 "factors".
The layer is a shapefile, where the municipalities needs to be in differents colours depending on which factors apply.
E.g.if "Beholder 2-kammer" contains 'x' and "Miljøstation/genbrug" does the same, then the municipality needs to be red.
But if "Beholder 2-kammer" contains 'x' and "Miljøstation/genbrug" doesn't, then it needs to be yellow, etc. etc.

There are many combinations, so I need a lot of colours.
I've tried with
"if($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Der_indsamles_hård_og_blød_plast_separat']=='x') + ($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Kun_genbrugsplads']=='x');
else if ($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Der__indsamles_kun_hård_plast']=='x') + ($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Miljøstation_genbrugsø']=='x');
else if ($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Der_indsamles_blandet_hård_og_blød_plast']=='x') + ($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Beholder_2_kammer']=='x')"
And
var geom1 = Polygon($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Kun_genbrugsplads']=='x');
var geom2 = Polygon($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Der_indsamles_hård_og_blød_plast_separat']=='x');
Overlaps(geom1,geom2);
var geom1 = Polygon($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Kun_genbrugsplads']=='x');
var geom2 = Polygon($feature['KOMMUNE_parcelhuse_plast_ExcelToTable.Der_indsamles_hård_og_blød_plast_separat']=='x');
Overlaps(geom1,geom2);
But it doesn't seem to work the right way.