Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I need to set conditional formatting base on measure result.
i'm using measure to get avarage, now i want to setup icon or color on avarage result as baseline.
Appriciate your support.
Thanks
Hi @mhdilyas ,
Please show us a concrete example and tell us the result you want. This way we can provide a more direct solution.
Reference: How to Get Your Question Answered Quickly.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mhdilyas ,
Here's a couple of DAX examples:
Format based on column value:
_empStatusFormat =
SWITCH(
TRUE(),
//greens
MAX(dimWorkTypes[empStatus]) = "Available", "#b1e59f",
//ambers
MAX(dimWorkTypes[empStatus]) = "Possible", "#fae9a0",
//purples
MAX(dimWorkTypes[empStatus]) = "Unavailable", "#dbc3d6",
//reds
MAX(dimWorkTypes[empStatus]) = "Unknown", "#f6a0a7"
)
Format based on measure value:
_ProfitRAG =
SWITCH(
TRUE()
,[_Profit] < 0.7, "#BE4A47"
,[_Profit] < 0.8, "#F2C80F",
"#01B8AA"
)
Be careful with how you use this though. In my experience, I've found using this a lot on a page can seriously slow down load times, although YMMV.
Pete
Proud to be a Datanaut!
Take a look at this article. It has a lot of good information on conditional formatting.
https://www.sqlshack.com/conditional-formatting-in-power-bi-2/
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
88 | |
82 | |
65 | |
64 | |
58 |
User | Count |
---|---|
171 | |
115 | |
109 | |
74 | |
69 |