Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 person achieve. The common column is the groupID, so a person can be in only 1 group, but a group is composed of many activities.
Thanks for your help.
Solved! Go to Solution.
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 )
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Hello @AlejandroPCar,
could you post a sample of your data?
thanks
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
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 )
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!