Forum Discussion
Ibaz
2 years agoNew Member
Multiple If AND ELSE querry
Hi All I have two colums status and date - depend on the status and if there is a date of not i need to show the Result HELP! every variation of IF AND i try in a calculated column gives a Synta...
- Anonymous2 years ago
Hi Ibaz ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
2.Create a measureMeasure = SWITCH( TRUE(), SELECTEDVALUE('Table'[Status]) = "Expired", "Expired", SELECTEDVALUE('Table'[Status]) = "In progress", "In progress", SELECTEDVALUE('Table'[Status]) = "Completed", "Completed", SELECTEDVALUE('Table'[Status]) = "Not started" && SELECTEDVALUE('Table'[Certification Expiration Date]) = "date","Completed", SELECTEDVALUE('Table'[Status]) = "Not started","Not started" )3. You can also create a column
Result1 = IF ( 'Table'[Status] = "In progress", "In progress", IF ( 'Table'[Status] = "Expired", "Expired", IF ( 'Table'[Status] = "Completed", "Completed", IF ( 'Table'[Status] = "Not started" && 'Table'[Certification Expiration Date] <> BLANK (), "Completed", "Not started" ) ) ) )
3.Final outputBest regards
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
2 years agoNot applicable
Hi Ibaz ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
2.Create a measure
Measure =
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[Status]) = "Expired", "Expired",
SELECTEDVALUE('Table'[Status]) = "In progress", "In progress",
SELECTEDVALUE('Table'[Status]) = "Completed", "Completed",
SELECTEDVALUE('Table'[Status]) = "Not started" && SELECTEDVALUE('Table'[Certification Expiration Date]) = "date","Completed",
SELECTEDVALUE('Table'[Status]) = "Not started","Not started"
)
3. You can also create a column
Result1 =
IF (
'Table'[Status] = "In progress",
"In progress",
IF (
'Table'[Status] = "Expired",
"Expired",
IF (
'Table'[Status] = "Completed",
"Completed",
IF (
'Table'[Status] = "Not started"
&& 'Table'[Certification Expiration Date] <> BLANK (),
"Completed",
"Not started"
)
)
)
)
3.Final output
Best regards
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly