Forum Discussion

ClearRide's avatar
ClearRide
Frequent Visitor
3 years ago
Solved

Counting with filter based on two tables

I need to count the number of People who have met their sales quotas. This is the Dax I have right now: Qualify Count = CALCULATE(COUNT(Org[SalesID]),  FILTER(Org, Sum(Sales[Sales] -  Sum(Org[Quot...
  • v-zhangti's avatar
    3 years ago

    Hi, ClearRide 

     

    After testing, it should be related to the context of the measure calculation. You can try the following methods.

    Measure1 = SUM(Sales[Sales])
    Measure2 = SUM(Org[Quota])
    Qualify Count = 
     CALCULATE(COUNT(Org[Sales ID]),FILTER(ALL(Org), [Measure1]>[Measure2]))

    At this point, the correct result is calculated.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.