Forum Discussion

andybamber's avatar
andybamber
Helper III
4 years ago
Solved

Measure Using Multiple Conditions On Multiple tables

Hello!

 

Hoping someone can help!

 

I have attached an example data set below.

 

What I am trying to do is build a measures with the following logic, which has to look at 2 different tables, apply conditional logic to fields in both tables, and then return a count of the matching rows from the cplan table. 

 

Condition 1 = COUNTROWS(cplan) WHERE (cplan[UsagePlan] NOT IN {"Plan2","Plan3"}) OR sys_status[Status] = "Active"

 

 PBIX File 

 

Cheers

Andy

2 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi andybamber 

    COUNTROWS ( FILTER ( c_plan, NOT ( c_plan[UsagePlan] IN { "Plan2","Plan3" } ) ) )
        + CALCULATE ( COUNTROWS ( c_plan ), sys_status[Status] = "Active" )