Forum Discussion
KBO
4 years agoMemorable Member
Conditional format based on two dates (with changing values)
Hi,
I guess someone will tell me that this is a very easy one but I tried a lot of things and hope that someone can help me ;).
Problem:
I have a traffic light logic in my model (which is worki...
- 4 years ago
Hi KBO ,
I have first cleaned up the relationships a bit.
After that I created the following measure for formatting. I hope it helps.
TL = VAR _Logic = FILTER ( Logic, Logic[Start] <= SELECTEDVALUE ( 'Date'[End of Month] ) && Logic[End] >= SELECTEDVALUE ( 'Date'[End of Month] ) ) VAR _Value = [Total Values] RETURN MAXX ( _Logic, SWITCH ( TRUE (), _Value < [Green ], "green", _Value <= [Yellow], "orange", _Value > [Red], "red", "grey" ) )
mwegener
4 years agoMost Valuable Professional
Hi KBO ,
I have first cleaned up the relationships a bit.
After that I created the following measure for formatting. I hope it helps.
TL =
VAR _Logic =
FILTER (
Logic,
Logic[Start] <= SELECTEDVALUE ( 'Date'[End of Month] )
&& Logic[End] >= SELECTEDVALUE ( 'Date'[End of Month] )
)
VAR _Value = [Total Values]
RETURN
MAXX (
_Logic,
SWITCH (
TRUE (),
_Value < [Green ], "green",
_Value <= [Yellow], "orange",
_Value > [Red], "red",
"grey"
)
)