Forum Discussion
DAXmnbk
2 years agoRegular Visitor
PowerBi DAX Background colour: Conditonal formatting for dynamic measures with same total
Hi frens, I was wondering if someone has ever done Dynamic conditional formatting based on dynamic values of measures. I have sales data for the different cities and I want dynamic color chan...
Dangar332
Resident Rockstar
2 years agohi, DAXmnbk
use below measure for conditional formatting
Measure =
var a = RANKX(ALL('Table'[value]),'Table'[value],MIN('Table'[value]))
return
SWITCH(TRUE(),
a=1,"#ff0000",
a=2,"#0000FF",
a=3,"#FFFF00",
a>3,"#FFA500"
)
below my data to test your requirnment
for measure in conditional formatting
click on column name and click on conditiona formatting and click on background color
2. change format style to field value and select measure from table and click on ok
DAXmnbk
2 years agoRegular Visitor
Hi Dangar332 thanks for replying, the values of A, B, C, and D are counted measures, and was wondering if there is a way of doing this thing with 4 different counted measures?
Cheers.