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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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