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 IX
Super User IX

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"
)

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

@ me in replies or I'll lose your thread!!!

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 IX
Super User IX

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"
)

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

@ me in replies or I'll lose your thread!!!

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Upcoming Events

Community Summit North America – Join Online!

Join this community-driven Power Platform digital event for unbiased support and problem-solving.

Top Solution Authors