Forum Discussion
Representing measure in table
- 5 years ago
Hi Dunner2020 ,
For color formatting, you can try to create a measure and use it in conditional formatting like so:
Conditional formatting Measure = VAR H_ = SELECTEDVALUE ( 'sde support_structure_evw'[AHI Score] ) VAR C_ = SELECTEDVALUE ( 'sde support_structure_evw'[Criticality zone] ) RETURN SWITCH ( TRUE (), H_ = "H1" && C_ = "C1", "light blue", H_ = "H2" && C_ IN { "C1", "C2" }, "deepskyblue", H_ = "H3" && C_ IN { "C1", "C2", "C3" }, "dodgerblue", H_ = "H4" && C_ IN { "C1", "C2", "C3", "C4" }, "blue", "green" )Reference: Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please see attached file (below signature) - you can set this up as Matrix visual. I would recommend created calculated columns in Power Query - so click Transform Data, then Add Column > Conditional Column.
If criticality zone = C1 then ..... and enter the info you need to get the correct column headings.
Repeat Add Column > Conditional Column for the H numbers as well. Then use these new columns in your matrix visual in place of the AHI and criticality zones.
Do you need help with the color formatting too?
AllisonKennedy , Thanks for the reply. Yes please, I need help in formatting too.
- Icey5 years ago
Community Support
Hi Dunner2020 ,
For color formatting, you can try to create a measure and use it in conditional formatting like so:
Conditional formatting Measure = VAR H_ = SELECTEDVALUE ( 'sde support_structure_evw'[AHI Score] ) VAR C_ = SELECTEDVALUE ( 'sde support_structure_evw'[Criticality zone] ) RETURN SWITCH ( TRUE (), H_ = "H1" && C_ = "C1", "light blue", H_ = "H2" && C_ IN { "C1", "C2" }, "deepskyblue", H_ = "H3" && C_ IN { "C1", "C2", "C3" }, "dodgerblue", H_ = "H4" && C_ IN { "C1", "C2", "C3", "C4" }, "blue", "green" )Reference: Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Icey5 years ago
Community Support
Hi Dunner2020 ,
Can the replies above solve your problem?
If they can, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, could you share us more details?
Best Regards,
Icey