Forum Discussion
knowledgesearch
3 years agoHelper I
Multiple conditions with IF (calculated, conditional column)
I have a baseline date measure for project tasks and todays measure, I want an if statement that states if the date is greater than or equal to 30 days then the RAG status is green, if the date is le...
parry2k
3 years agoSuper User
knowledgesearch It is much easier with switch, although you can also do with IF but SWITCH is easy to read and debug.
VAR __Days = [Baseline Date]-[Today's Date]
RETURN
SWITCH ( TRUE (),
__Days >= 30, "Green",
__Days >= 10, "Amber",
"Red"
)
- knowledgesearch3 years agoHelper I
It is saying incorrect syntax for return, this is a calculated column measure I have a calculated column that calculates the difference between the baseline and today's date.