Forum Discussion

ramhariessentia's avatar
4 years ago
Solved

DAX formula help

Hi all, I have a requirement to find out the number of cases requiring inspection based on the number of cases submitted by each account. eg. Lets say i have got 90 cases from an account, I need t...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi ramhariessentia ,

    For me, it is difficult to give a perfect solution based on your formula by imagination alone. I have tried my best to give an answer close to your needs, but in your actual production environment, you need to adjust it to your actual situation, and I hope the solution given this time will be useful to you.

     

    I just adjust the DAX formula according to your demands, add a new column by below formula

    Column 2 =
    VAR cur_indexbyapp = 'Case'[index_by_app]
    VAR cur_app = 'Case'[Applicant]
    VAR tmp =
        FILTER ( 'Case', 'Case'[Applicant] = cur_app && 'Case'[Inspection] = "no" )
    VAR ctn =
        COUNTROWS ( tmp )
    RETURN
        SWITCH ( TRUE (), ctn = 2, "yes", BLANK () )
    

    Please refer attached .pbix file.

     

    Best regards,
    Community Support Team_ Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.