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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

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.