Forum Discussion
conditional formatting doesn't work
Giada_Togliatti ,this is because the range will change, In fact, for one value those ranges might not apply. What are the conditions you are using?
Try to create a color measure with help from isinscope and isfilter and use that with "Field" option
example
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)
refer for isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
Use of color measure
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
amitchandak I can't use FIRSTNONBLANK with a measure, in the formula I used a measure inside another measure
example = Switch( true(),
V_REPORT_PPM_RISORSE[measure1]>selectedvalue('Limite superiore'[Limite superiore 1]), "red",
V_REPORT_PPM_RISORSE[measure1]>selectedvalue('Limite inferiore'[Limite inferiore 1]) &&
V_REPORT_PPM_RISORSE[measure1]<selectedvalue('Limite superiore'[Limite superiore 1]), "light green","yellow")
and, do you know if it's possible to apply conditional formatting for total in a table?
- v-deddai1-msft6 years agoCommunity Support
Hi,
You should change the 'Apply to' options to Values only:
Best Regards,
Dedmon Dai