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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.