Forum Discussion
AlejandroPCar
Helper IV
7 years agoSummarize with M2M relationships
Hi, How can I create a SUMMARIZE between two tables whose have a Many to Many relationship? Right-hand activities table vs left-hand people table. The idea is to know how many activities can a pe...
- 7 years ago
Hello AlejandroPCar
You need to create a Group table with this DAX query:
Groups = DISTINCT( UNION( ALLNOBLANKROW( Activities[groupID] ), ALLNOBLANKROW( People[groupID] ) ) )
then create these relationships:
then drop the person ID on the matrix rows and add this measure:
Measure = CALCULATE( COUNTROWS( Activities ), CROSSFILTER( People[groupID], Groups[groupID], Both ) )
AlejandroPCar
Helper IV
7 years agoLivioLanzo
Solution Sage
7 years agoHello AlejandroPCar
You need to create a Group table with this DAX query:
Groups = DISTINCT( UNION( ALLNOBLANKROW( Activities[groupID] ), ALLNOBLANKROW( People[groupID] ) ) )
then create these relationships:
then drop the person ID on the matrix rows and add this measure:
Measure =
CALCULATE(
COUNTROWS( Activities ),
CROSSFILTER( People[groupID], Groups[groupID], Both )
)- AlejandroPCar7 years ago
Helper IV