Forum Discussion
Anonymous
5 years agoNot applicable
custom conditional formatting?
Hey guys, basically I have these three columns and I need to make conditional formatting so as that if first column value exceeds second column value, then return the difference. Otherwise, if it doe...
- 5 years ago
Hi Anonymous
what about the following solution:
Difference = VAR _Calculation = CALCULATE( MIN('Table'[naujasbandymas]) - MIN('Table'[norma]), FILTER('Table', 'Table'[naujasbandymas] >= 'Table'[norma]) ) RETURN IF(_Calculation = BLANK(),TIME(0,0,0), _Calculation)With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
amitchandak
5 years agoSuper User
Anonymous , you can create a color measure and use that in conditional formatting using "Field Value" Option
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"
)
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