Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
roopa_123
Helper I
Helper I

DAX

Hi Team,

I have two tables in my powerbi desktop with many to many relationship between them.

I have a primary key column in tableA and another primary key column in tableB. I need to get the count of records on a visual but that count should be combination of the primary keys from table A and tableB.
For example the primarykey from tableA is 'ABC' and primarykey from tableB is '123', then my count on the visual should consider the combination of 'ABC123' as single column and give the count value.
How can I achieve this using DAX? Any help is appreciated!

Thanks in advance!

4 REPLIES 4
roopa_123
Helper I
Helper I

Hi Stephan

I will try to provide when I get back to work on this topic again.  Thanks for your help!!

amitchandak
Super User
Super User

@roopa_123 ,Try if this can work 

 

countrows(summarize(Table1, Table[ID],Table2[ID] ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak : That didn't work 😔

Anonymous
Not applicable

Hi @roopa_123 ,

 

Is it possible to provide some dummy data and expected results?

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.