Forum Discussion

DeeBali's avatar
DeeBali
Helper I
2 years ago
Solved

Multiple Filters OR on multiple columns from multiple tables

Hello Fabric Community,

 

I need some assistance in solving a calculation I am attempting. So I am trying to count Name column in one of my tables called "MasterList" based on filters across multiple tables and columns (that all i have relationships to each other). However the logic I need to use is that the calculation counts if either of the filter is true, not when every single filter is true. Here is the code I am using:

NON COMPLIANT = calculate(distinctcount(MasterList[Name]), AD[In SCCM]="No",SCCM[In AD]="No",Defender[Onboarded]="No",Purview[Onboarded]="No", InTune[Onboarded]="No",MasterSecureBaseline[State] ="Yes")

So this gives me a number based on all these conditions being true (which is much lower number than expected). What I am trying to do is count Name column in MasterList table when any of the filters is true (like a OR logic). Please help me! Thank you team! 

10 Replies

    • DeeBali's avatar
      DeeBali
      Helper I

      Hello,

       

      Thank you for your response. I have not used IN funtion prior to this, may I get some hint on how to write this statement? Thank you. 

      • lbendlin's avatar
        lbendlin
        Super User

        It doesn't apply in your scenario.  You would use the || operator

         

        NON COMPLIANT = calculate(distinctcount(MasterList[Name]), 
                                          AD[In SCCM]="No" || 
                                          SCCM[In AD]="No" || 
                                          Defender[Onboarded]="No" || 

                                          Purview[Onboarded]="No" || 

                                          InTune[Onboarded]="No" || 

                                          MasterSecureBaseline[State] ="Yes")

         

        You may need aggregations - depends on your setup.