Forum Discussion
Matrix-Conditional formating based on another field
Hi Anonymous ,
Based on the sample data you provided, I get the result you expect.
Measure = SWITCH(TRUE(),
WEEKDAY(MAX(Sheet1[weekdate]),2)in{6,7},"yellow",
MAX(Sheet1[hours])=0||ISBLANK(MAX(Sheet1[hours])),"pink",
MAX(Sheet1[categorydesc ])="Holiday","black",
MAX(Sheet1[categorydesc ])="Vacation","orange",
MAX(Sheet1[categorydesc ])="Labor - Daily","green",
MAX(Sheet1[categorydesc ])="Labor - Hourly ","green",
MAX(Sheet1[categorydesc ])="Labor - Salary","green",
"white")Here is the sample pbix
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
V-lianl-msft Here is my pbix file. All of the colors are not working.
when there are no hours the background should be pink. Also, it is only shading saturdays not sundays. please let me know if you can access the file, if not please send me an email address. Thanks a lot for your hel
- V-lianl-msft6 years agoCommunity Support
Hi Anonymous ,
Unfortunately, we are performing conditional formatting on "work hours" and can only judge when "work hours" has value.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.