Search code examples
powerbidaxpowerpivot

How to filter from the "many" side of a relationship?


I hope that you can help me with this. Apologies for not preparing an example file. The relevant part of my data model is this.

What I'm trying to do is creating a measure calculating the % of activities per customer filtering a specific "FeeType" (TypeA) from the Fees table, out.

I've tried:

NrofActivities = COUNT(Activities[CaseID])
ActivitiesNo_TypeA = CALCULATE([NrofActivities];
FILTER(ALL(Fees); NOT(
Fees[FeeType]="TypeA")))
Activities%GT_No_TypeA = DIVIDE (
                 [ActivitiesNo_TypeA];
                 CALCULATE([ActivitiesNo_TypeA];ALLSELECTED(Customers)))

The measure seems to be working on a table with the activity types.

However it is not working when matched with customers.

Thank you very much in advance!


Solution

  • double-click the relationship and select both-way filtering. This feature should be used with caution.