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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
danisharoon
Helper I
Helper I

Limit the slicer to show values present in a fact table

Hi

 

I have a dimension shared by two facts. That dimension has 3 distinct values. Fact table A, has all 3 distinct values, and table B has 2 out of 3 distinct dimension values.

 

I am displaying the insights in two pages, one for each fact. When I put the dimension as a slicer on the canvas, it is displaying 3 distinct values on both pages, whereas it should display 3 on the first, and 2 on the second page.

 

What's the workaround to solve it?

Link to the .pbix file is as follows:

https://nflpk-my.sharepoint.com/:u:/g/personal/danish_haroon_nfoods_com/EVaReFdgHPJLnqf-4g7WcW0BPbJ8...

 

Danish

 

1 ACCEPTED SOLUTION

Hi @danisharoon ,

 

I suggest you to create a measure to filter the slicer in Page2.

My Sample:

dim_prod_category:

RicoZhou_0-1654585855764.png

Fact Table1:

RicoZhou_1-1654585876183.png

Fact Table2:

RicoZhou_2-1654585882856.png

Measure:

Slicer Filter In Page 2 =
VAR _CATEGORY_IN_Fact2 =
    VALUES ( 'Fact Table2'[product category name] )
RETURN
    IF (
        MAX ( dim_prod_category[product category name] ) IN _CATEGORY_IN_Fact2,
        1,
        0
    )

Add this measure into visual level filter of the slicer visual and set it to show items when value =1.

RicoZhou_3-1654585983356.png

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
danisharoon
Helper I
Helper I

This ain't working

 

danisharoon_0-1654255977455.png

 

Hi @danisharoon ,

 

I suggest you to create a measure to filter the slicer in Page2.

My Sample:

dim_prod_category:

RicoZhou_0-1654585855764.png

Fact Table1:

RicoZhou_1-1654585876183.png

Fact Table2:

RicoZhou_2-1654585882856.png

Measure:

Slicer Filter In Page 2 =
VAR _CATEGORY_IN_Fact2 =
    VALUES ( 'Fact Table2'[product category name] )
RETURN
    IF (
        MAX ( dim_prod_category[product category name] ) IN _CATEGORY_IN_Fact2,
        1,
        0
    )

Add this measure into visual level filter of the slicer visual and set it to show items when value =1.

RicoZhou_3-1654585983356.png

 

Best Regards,
Rico Zhou

 

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

@danisharoon , Use a measure from fact as visual level filter and check for non blank

 

Take an example from this video if needed

 

https://www.youtube.com/watch?v=cyOquvfhzNM

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Yes in this case one can use a filter from the fact table. But in other cases this solution above is of huge value! 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.