The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi I am using the following Dax to apply conditional formatting and it is working as I expect it to.
Where if the PartofTerm Row is above 90% it turns it to Pink
if the Modality is above 90% it turns it to Yellow
if the Course is above 90% it turns it to Red
Color Measure =
SWITCH(
TRUE()
,ISFILTERED(SectionEntollment[PartofTerm]) && [PCTFilled] >= .90, "#FF9999"
,ISFILTERED(SectionEntollment[Modality]) && [PCTFilled] >= .90, "#FFE699"
,ISFILTERED(SectionEntollment[Course]) && [PCTFilled] >= .90, "#C00000"
)
The problem I am having is if I filter the table by the PartofTerm or Modality, it loses the Conditional Formatting.
Can anyone help fix this?
Thanks
Daryl
Solved! Go to Solution.
@dbldee5 I think this is due to the way you've used ISFILTERED in your measure. Order matters when using the SWITCH function so your measure will only work for the specific matrix layout in your image, and if you don't filter by modality or part of term (as then you'll lose the conditional formatting on the ones below it in your switch statement).
You could try using ISINSCOPE instead of the ISFILTERED, you may need to reverse the order in this case, I'm not certain. I struggle with ISINSCOPE myself and also use ISFILTERED in its place when it makes sense to, but in theory ISINSCOPE should work beautifully here if you get the order right. 🙂
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@dbldee5 I think this is due to the way you've used ISFILTERED in your measure. Order matters when using the SWITCH function so your measure will only work for the specific matrix layout in your image, and if you don't filter by modality or part of term (as then you'll lose the conditional formatting on the ones below it in your switch statement).
You could try using ISINSCOPE instead of the ISFILTERED, you may need to reverse the order in this case, I'm not certain. I struggle with ISINSCOPE myself and also use ISFILTERED in its place when it makes sense to, but in theory ISINSCOPE should work beautifully here if you get the order right. 🙂
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com