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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MateusMontemor
New Member

show count of IDs that converge based on a second table

Hello,

 

I'm facing the current issue, i have the two databases below

MateusMontemor_0-1692626267246.png

The Project has one row per project with its description, financial info and multiple information across the columns, each with one unique id and name,  the SKU by project has one sku per row, having multiple SKUs for each project and SKUs that have multiple projects, (example:

ROW 1: SKU: X, Project Name: One,

ROW2 : SKU Y, Project Name: One

ROW 3: SKU X, Project name: Two,

so thats why the relationship is one to many based on project name

 

What i wanted is to check sku convergence between project filtering on one project so: 

 

for the example i gave, if i filter on the slicer Project Name "One", it would show a table with all the projects that have skus in common with project "One" and its info from the Project table:

Slicer Project name: "One" is selected

table:

ROW 1: Project Name "One", Project ID: "1", Investment "$$$"

ROW 2: Project Name "Two", Project ID "2", Investment "$$$"

 

So basically i would know these 2 project have skus in common and in another table i would show which skus (this one i was able to do)

 

I tried doing some calculations with filters and crossfilter to try and filter the table but it didn't work, because it seems i always end up in a loop where i'm trying to filter table Project with information from SKU by project and return info from Project table, don't know if it makes sense haha

 

Thanks in advance for any suggestions!

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MateusMontemor ,

 

This is a sample data table, and I also added two rows for demonstration.

vstephenmsft_3-1693213333460.png

 

Solution:

1.Create a separate table with Project Name. Separate means that there is no relationship between your table and the table with SKUs. And the table is created for the slicer.

vstephenmsft_1-1693212735203.png

vstephenmsft_2-1693212740893.png

 

2.Create a measure for visual-level filter.

Measure = var _sel=SELECTEDVALUE('Table 2'[Project Name])
var _tab=SELECTCOLUMNS(FILTER(ALL('Table'),[Project Name]=_sel),"SKU",[SKU])
return
IF(MAX('Table'[SKU]) IN _tab ,1,0)

Put the measure into the filters and set up show items when the value is 1. The field of the slicer is from Table 2.

As you can see, when "One" is filtered in the slicer, SKU with X and Y are filtered.

52.png

 

You can check more details from my attachment.

                                                                                                                                                         

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.           

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MateusMontemor ,

 

This is a sample data table, and I also added two rows for demonstration.

vstephenmsft_3-1693213333460.png

 

Solution:

1.Create a separate table with Project Name. Separate means that there is no relationship between your table and the table with SKUs. And the table is created for the slicer.

vstephenmsft_1-1693212735203.png

vstephenmsft_2-1693212740893.png

 

2.Create a measure for visual-level filter.

Measure = var _sel=SELECTEDVALUE('Table 2'[Project Name])
var _tab=SELECTCOLUMNS(FILTER(ALL('Table'),[Project Name]=_sel),"SKU",[SKU])
return
IF(MAX('Table'[SKU]) IN _tab ,1,0)

Put the measure into the filters and set up show items when the value is 1. The field of the slicer is from Table 2.

As you can see, when "One" is filtered in the slicer, SKU with X and Y are filtered.

52.png

 

You can check more details from my attachment.

                                                                                                                                                         

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.           

amitchandak
Super User
Super User

@MateusMontemor , You have to create an independent diconnected table with all projects

 

Name = distinct(Project[Project Name]) // Do no join with your table

 

Then you can create a measure like 

 

measure =

var _sku = summarize(filter(allselected(Project), Project[Project name] in values(Name[Project Name]) ), Project[Sku])
return
countx(filter( Project, Project[Sku] in _sku), Project[Project name])

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors