Forum Discussion

AlGrant's avatar
AlGrant
Frequent Visitor
3 years ago
Solved

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

 

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

5 Replies

  • 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.

    • AlGrant's avatar
      AlGrant
      Frequent Visitor

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

      • grantsamborn's avatar
        grantsamborn
        Icon for Solution Sage rankSolution Sage

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