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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

filter based on similar items in dimensional table

Dear all,


For simplicity, I have a dimension table (table1) with a key and two dimensions. Also have a fact table (table2) with the same key and linked one-to-many to teh fact table.  Also have a slicer with the key (ID) of the dimension table as values. When I select a value, I would like to filter the fact table for all ID's that have the same dimensions as the selected value in the slicer, so in my case below id =1,3,4. Anyone any clues?

regards

Table1
IDDim1Dim2
1AC
2AD
3AC
4AC
5BD
6BD
7BC
8BD
Table2
IDCity
1New York
3San Francisco
2Boston
2Atlanta
4Miami
1Seatle
5Houston
7Washington
Outcome
IDCity
1New York
3San Francisco
4Miami
1Seatle



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1)  My test data is the same as yours.

(2) We can create a table and a measure.

 

Table 3 = 'Table1'
Measure = 
VAR _dim1 = SELECTEDVALUE('Table 3'[Dim1])
VAR _dim2 = SELECTEDVALUE('Table 3'[Dim2])
VAR _table = CALCULATETABLE(VALUES('Table1'[ID]),FILTER(ALLSELECTED('Table1'),'Table1'[Dim1]=_dim1 && 'Table1'[Dim2] =_dim2))
VAR _filter = IF(SELECTEDVALUE('Table2'[ID]) IN _table,1)
RETURN
_filter

 

vtangjiemsft_0-1677028813201.png

(3) Filter visuals with measure and then the result is as follows.

vtangjiemsft_1-1677028918951.png

Best Regards,

Neeko Tang

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1)  My test data is the same as yours.

(2) We can create a table and a measure.

 

Table 3 = 'Table1'
Measure = 
VAR _dim1 = SELECTEDVALUE('Table 3'[Dim1])
VAR _dim2 = SELECTEDVALUE('Table 3'[Dim2])
VAR _table = CALCULATETABLE(VALUES('Table1'[ID]),FILTER(ALLSELECTED('Table1'),'Table1'[Dim1]=_dim1 && 'Table1'[Dim2] =_dim2))
VAR _filter = IF(SELECTEDVALUE('Table2'[ID]) IN _table,1)
RETURN
_filter

 

vtangjiemsft_0-1677028813201.png

(3) Filter visuals with measure and then the result is as follows.

vtangjiemsft_1-1677028918951.png

Best Regards,

Neeko Tang

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

onurbmiguel_
Power Participant
Power Participant

Hello 

I have try like this: 

onurbmiguel__0-1675938789599.png

 

create a slicer: 

onurbmiguel__1-1675938837550.png

onurbmiguel__2-1675938863926.png

 

ands i return this output:

onurbmiguel__3-1675938931132.png

 

Is this what you want? 

 

Best regards

Bruno Costa | Solution Supplier

 

Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 👍

Take a look at the blog: PBI Portugal 

wp-1586527108426

 

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Anonymous
Not applicable

not exactly as i just want to slicer on ID =1 and then filter on al similar id's with same characteristics in table1. For small example likt this your sollution would work, but this is a simplification of a much larger case with thousands of row

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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