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 and multiple conditions

Hello,

 

I'm trying to flag items in our app tracker list as at risk based on timeline and status and could use some guidance. I am new to Powerbi. 

 

I have a list of items along with Status column and a Start Date column. I want to flag items as at risk if they are not "complete" ("in progress" or "not started") and are past their start date. I would also like to flag items as as at risk if they blank start date, but not those which are complete.

 

Below is what I have so far but that does not exclude the completed items that have no date:

 

At Risk Decom date (y/n)
= IF('CMI Application Tracker'[Decom Status (remove blanks)] <> "Complete"
&& 'CMI Application Tracker'[On-Prem Decom Date] < TODAY() || 'CMI Application Tracker'[On-Prem Decom Date] =BLANK() , "Yes", "No")
 
AlGrant_0-1680545792287.png

 

1 ACCEPTED SOLUTION

After re-reading, I guess all that have a status of Complete are not a risk.

At Risk Decom date (y/n) 2 = 
IF(
    'CMI Application Tracker'[Decom Status] <> "Complete"
        && OR(
            'CMI Application Tracker'[On-Prem Decom Date] < TODAY(), 
            'CMI Application Tracker'[On-Prem Decom Date] = BLANK() ),
    "Yes",
    "No"
)

View solution in original post

5 REPLIES 5
grantsamborn
Solution Sage
Solution Sage

Hi @AlGrant 

I'm not quite sure if I understand completely.

Maybe try a calculated column like this:

 

 

At Risk Decom date (y/n) = 
IF(
    ('CMI Application Tracker'[Decom Status] <> "Complete"
        && 'CMI Application Tracker'[On-Prem Decom Date] < TODAY()
    )
    ||
    ('CMI Application Tracker'[Decom Status] = "Complete"
        && 'CMI Application Tracker'[On-Prem Decom Date] = BLANK()
    ),
    "Yes",
    "No"
)

 

 

 

 

Let me know if that helps.

Hi, thanks for the help, unfortunately that still flags items as at risk that are complete but have blank on-prem  decom dates

After re-reading, I guess all that have a status of Complete are not a risk.

At Risk Decom date (y/n) 2 = 
IF(
    'CMI Application Tracker'[Decom Status] <> "Complete"
        && OR(
            'CMI Application Tracker'[On-Prem Decom Date] < TODAY(), 
            'CMI Application Tracker'[On-Prem Decom Date] = BLANK() ),
    "Yes",
    "No"
)

Thank you! 

If I change it to <> BLANK(), then the results don't match your 3rd column (which I thought was the expected result.)

 

pbix: https://drive.google.com/file/d/1FuN_LCenyMu27R5vD7RTnYlKUMzaIyqc/view?usp=share_link

 

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.