Forum Discussion

ggalstyan's avatar
ggalstyan
Frequent Visitor
3 years ago

multiple ifs with multiple conditions

Hello everyone,

I am trying to solve the following issue with multiple ifs and conditions

if eventnumber=eventnumber and unit's(starts with BLS or RA) dispatch time is after unit's dispatch time(starts with E or T), then TRUE, FALSE.

I might bring more variables later, but now need to make these conditons work

Much appreciated!

6 Replies

  • ggalstyan , Based on what I got

    new column =

    var _cnt = countx(filter(Table,[eventnumber] = earlier([eventnumber])  && ( left([unit],3) = "BLA" || left([unit],2) = "RA") && [Entry Time] > earlier([Entry Time] ) ),[eventnumber])

    return

    if(isblank(_cnt), "No", "Yes")

     

    Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

    • ggalstyan's avatar
      ggalstyan
      Frequent Visitor

      amitchandak @Thanks I Will try this tomorrow and let you know if works: I believe I understand the concept now.

       

    • ggalstyan's avatar
      ggalstyan
      Frequent Visitor

      amitchandak 

      I got the yes and no but the out come is incorrect, I need more help please

      RA/BLS added afterwards =
      var _cnt=COUNTX(FILTER(URPT,[EVENTNUMBER]=EARLIER(URPT[EVENTNUMBER]) &&(LEFT(URPT[UNIT],3)="BLS" ||LEFT(URPT[UNIT],2)="RA") &&[DISPATCH].[Date]>EARLIER(URPT[DISPATCH].[Date])),URPT[EVENTNUMBER])
      return
      IF(ISBLANK(_cnt),"No","Yes")
       
      For the followig I was excpecting yellows to be yes and blue to be no

      and for eventnumber 23001414 it should ideally return n/a as there were no RA/BLS added to this call at all.

      Thanks

       

      • amitchandak's avatar
        amitchandak
        Super User

        ggalstyan ,
        Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Hello, I need to add a condition to an already existing formula:

     

    Where Form submitted = 1 AND BOR date = 0 it should calculate days between Form submitted on and today.

     

    IF('PRC Change Management Pipeline List'[Number Form Submitted on]=1,IF('PRC Change Management Pipeline List'[Number BOR updated date number]=1,CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar',WEEKDAY('Calendar'[Date],2)<6),DATESBETWEEN('Calendar'[Date],'PRC Change Management Pipeline List'[Form Submitted on],'PRC Change Management Pipeline List'[BOR updated date]-1))))
     
    Your help will be greatly appreciated 🙂