Forum Discussion
Anonymous
3 years agoNot applicable
Tricky IF DAX Formula
Hi Experts I want to do the following as a either a if or Switch in a calculated column... If (RTT[Actual_Weeks_Waiting] < 18, "Under 18", If (RTT[Actual_Weeks_Waiting] >=18, "18+", If (RT...
- 3 years ago
Anonymous,
Try this calculated column:
CalculatedColumn = SWITCH ( TRUE, RTT[Actual_Weeks_Waiting] >= 78, "78+", RTT[Actual_Weeks_Waiting] >= 72, "72+", RTT[Actual_Weeks_Waiting] >= 52, "52+", RTT[Actual_Weeks_Waiting] >= 18, "18+", RTT[Actual_Weeks_Waiting] < 18, "Under 18", BLANK () )
DataInsights
3 years agoSuper User
Anonymous,
Try this calculated column:
CalculatedColumn =
SWITCH (
TRUE,
RTT[Actual_Weeks_Waiting] >= 78, "78+",
RTT[Actual_Weeks_Waiting] >= 72, "72+",
RTT[Actual_Weeks_Waiting] >= 52, "52+",
RTT[Actual_Weeks_Waiting] >= 18, "18+",
RTT[Actual_Weeks_Waiting] < 18, "Under 18",
BLANK ()
)- Anonymous3 years agoNot applicable
Excellent sir worked.......
- DataInsights3 years agoSuper User
Anonymous,
Glad to hear it worked. By the way, you can remove the BLANK() argument since it will return BLANK if none of the conditions are met.
- Anonymous3 years agoNot applicable
could you shed some light on the following
link: https://community.powerbi.com/t5/Desktop/Switch-Measure-error/m-p/2825247#M976120
- DataInsights3 years agoSuper User
Anonymous,
I looked at your other post and noticed a missing close parenthesis at the end.
- Anonymous3 years agoNot applicable
Hi - even with that corrected its still not returning back the correct result