cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Need Help with SWITCH or IF function

Hi!

 

Im trying to create a calculated column to determine the status using 2 columns (initial and final review) as reference.

 

INITIAL REVIEWFINAL REVIEWSTATUS
COMPLETED PENDING FINAL REVIEW
COMPLETEDCOMPLETEDCOMPLETED
  PENDING INITIAL AND FINAL REVIEW

 

I have trouble how to incorporate the non-blanks into DAX.

So far I have come up with:

 

=SWITCH(TRUE(),[INITIAL Review]&&[FINAL REVIEW]=BLANK(),"PENDING INITIAL REVIEW",[INITIAL Review]&&[FINAL REVIEW]=,"COMPLETED",)

 

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Need Help with SWITCH or IF function

@jrpoli2000- Perhaps try this:

 

STATUS = 
SWITCH(
    TRUE(),
    ISBLANK([INITIAL REVIEW]) && ISBLANK([FINAL REVIEW]),
        "PENDING INITIAL AND FINAL REVIEW",
    [INITIAL Review]="COMPLETED" && [FINAL REVIEW]="COMPLETED",
        "COMPLETED",
    "PENDING INITIAL REVIEW"
)

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: Need Help with SWITCH or IF function

@jrpoli2000- Perhaps try this:

 

STATUS = 
SWITCH(
    TRUE(),
    ISBLANK([INITIAL REVIEW]) && ISBLANK([FINAL REVIEW]),
        "PENDING INITIAL AND FINAL REVIEW",
    [INITIAL Review]="COMPLETED" && [FINAL REVIEW]="COMPLETED",
        "COMPLETED",
    "PENDING INITIAL REVIEW"
)

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted
Frequent Visitor

Re: Need Help with SWITCH or IF function

Thanks a lot!!! also used ISTEXT because the entry sometimes for both Initial and Final Review columns will not be always COMPLETED.

 

Thanks again! 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors