Forum Discussion
Anonymous
2 years agoNot applicable
Conditional formatting
Hi,
I have a measure Delta as follow:
Delta = SWITCH(
TRUE(),
[Hours_Submitted_TS] - [Hours_Forecast] > 0, "Charged more than expected",
[Hours_Submitted_TS] - [Hours_Forecast] < 0, "Charged less than expected",
[Hours_Submitted_TS] - [Hours_Forecast] = 0, "Charged as forecasted"
)
I put this measure in a table and would like to change colors depending on the text.
Since this is not based on a field (also using 2 more measures9 , I don't see how to do it.
Thanks for your help.
LD
Hi Anonymous,
You can use a measure to define the color like this:
Delta Color= SWITCH(TRUE(),[Delta ] = "Charged more than expected", "RED",[Delta ] = "Charged less than expected", "YELLOW",[Delta ] = "Charged as forecasted", "GREEN")
Then go to Format Ribon and follow the path indicated by ChiragGarg2512., like this:
6 Replies
- _AAndradeResident Rockstar
Hi Anonymous,
You can use a measure to define the color like this:
Delta Color= SWITCH(TRUE(),[Delta ] = "Charged more than expected", "RED",[Delta ] = "Charged less than expected", "YELLOW",[Delta ] = "Charged as forecasted", "GREEN")
Then go to Format Ribon and follow the path indicated by ChiragGarg2512., like this:
- ChiragGarg2512Solution Sage
_AAndrade Thanks for the correction.
- ChiragGarg2512Solution Sage
Go to Format Visual -> Cell Element -> Background Color -> Field[Format Style] -> Select the measure.
- AnonymousNot applicable
Hi,
Well, nothing happens.
I have
Format style: Field value
Apply To: Values only
What field: Delta
- _AAndradeResident Rockstar
You need to choose What field: Delta Color (the new measure)