Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AlGrant
Frequent Visitor

Help with If statement with And and OR included

I'm trying to flag items in our app tracker list as at risk (Yes or No) based on timeline and running into problems. FYI - I am new to Powerbi. 

 

I have a list of items with Status column and a Start Date column. I want to flag items as At Risk if they are not "complete" or "In Progress" and are past their start date. I would also like to flag items as as at risk if they have a blank start date and are not "Complete" (In Progress or Not Started).

 

Below is what I have so far, problem is that "In Progress" items that have a blank start date are not being flagged as at risk.

 

At Risk start date (y/n) = IF('CMI Application Tracker'[Migration Status] = "Not Started"
    && 'CMI Application Tracker'[Migration Start Date] < TODAY() , "Yes", "No")
 
AlGrant_0-1680624390396.png

 

Thanks again @grantsamborn for helping out on my last help request...this is similar but unfortunately I was not able to adjust and get it working.

1 ACCEPTED SOLUTION
grantsamborn
Solution Sage
Solution Sage

Hi @AlGrant 

Can you give this a try?

At Risk start date (y/n) = 
IF(
    ( 'CMI Application Tracker'[Cloud Migration Status] = "Not Started"
        && 'CMI Application Tracker'[Migration Start Date] < TODAY() )
    ||
    ( 'CMI Application Tracker'[Cloud Migration Status] <> "Complete"
        && 'CMI Application Tracker'[Migration Start Date] = BLANK() ),
    "Yes",
    "No"
)

 

View solution in original post

2 REPLIES 2
AlGrant
Frequent Visitor

Thanks again @grantsamborn

grantsamborn
Solution Sage
Solution Sage

Hi @AlGrant 

Can you give this a try?

At Risk start date (y/n) = 
IF(
    ( 'CMI Application Tracker'[Cloud Migration Status] = "Not Started"
        && 'CMI Application Tracker'[Migration Start Date] < TODAY() )
    ||
    ( 'CMI Application Tracker'[Cloud Migration Status] <> "Complete"
        && 'CMI Application Tracker'[Migration Start Date] = BLANK() ),
    "Yes",
    "No"
)

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.