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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hgromek
Frequent Visitor

Filters - Relevant Data Only?

I have 3 fact tables with 1 to many relationships to my data table. On the Filters pane, I want the fact table choices to only show the data relevant to the data table. 

 

For example 

 

Data Table: Sales of colored t-shirts. relationship based on colorID. 

Fact Table: Colored t-shirts. (ColorID and Color) 

 

in the data, there are only red and blue sales, but in the colored t-shirts table, we have many color options Red, Blue, Yellow, Green. 

 

The current filter pane shows all colors (even with no sales). I would like it to only show Red and Blue since that is what's in the data.  

 

Is it possible? Do I need to just merge all the tables into 1? What's the point of the relationships then? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @hgromek ,

I created some data:

Data Table:

vyangliumsft_0-1631586296011.png

Fact Table:

vyangliumsft_1-1631586296013.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Data Table'[ColorID]) in SELECTCOLUMNS('Data Table',"colorid",'Data Table'[ColorID]),1,0)

2. Place the measure in Filters, set is =1, apply filter.

vyangliumsft_2-1631586296015.png

3. Result:

Only display the content in the Data Table.

vyangliumsft_3-1631586296017.png

 

Best Regards,

Liu Yang

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  @hgromek ,

I created some data:

Data Table:

vyangliumsft_0-1631586296011.png

Fact Table:

vyangliumsft_1-1631586296013.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Data Table'[ColorID]) in SELECTCOLUMNS('Data Table',"colorid",'Data Table'[ColorID]),1,0)

2. Place the measure in Filters, set is =1, apply filter.

vyangliumsft_2-1631586296015.png

3. Result:

Only display the content in the Data Table.

vyangliumsft_3-1631586296017.png

 

Best Regards,

Liu Yang

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

@hgromek , Create a measure like this and use that in visual level filter of you filter pane and check for non blank value 

 

Measure =  countrows(Data) + countrows(Fact)

 

measure <> blank in visual level filter of color 

 

This will make filter dependent of values of both tables

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

Maybe I misunderstood the suggestion because it doesn't limit the filters. I also have the filters on either filter on-page or filters on all pages

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.