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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Counting how many rows within 'Groups' in Table01 Contain the individual Group names within Table02

Hey all,

 

So I have two tables:

Table01, which countain a list of Assets, with one column being a list of Groups it belongs to - Comma seperated.

Table02, which was generated as a seperate table to contain all of these independent Group names, de-duplicated and cleaned.

 

I would like to add another column within Table02 to show many Assets within Table01 are part of this specific group, but I can't seem to find something that works across tables (no relation) utlising Contains.

 

A brief view...

 

Table01:

Asset Name | Groups

Asset01 | Group01, Group03

Asset02 | Group02

Asset03 | Group02, Group03

 

Table02:

Group Name | Number of Assets

Group01 | ?

Group02 | ?

Group03 | ?

 

Any help would be very much appreciated!

Thanks in advance.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , new column in table 2

 

countx(filter(Table1, containsstring(Table1[Group], Table2[Group])), Table1[Assets])

 

or

 

calculate(distinctCOUNT(Table1[Assets]) , filter(Table1, containsstring(Table1[Group], Table2[Group])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , new column in table 2

 

countx(filter(Table1, containsstring(Table1[Group], Table2[Group])), Table1[Assets])

 

or

 

calculate(distinctCOUNT(Table1[Assets]) , filter(Table1, containsstring(Table1[Group], Table2[Group])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Perfect! the CountX option worked like a dream.

 

Thanks for the help.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors