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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Slicers based on dimensions filtering other dimensions

Hi,

 

I have two excel files (my two fact tables) as a source with common columns.

 

I've append these two fact tables and created dimensions based on these appends, selecting the columns that I wanted and removing the duplicates and then connecting to my two fact tables.

 

If I filter the information in the slicers, it filters correctly the two fact tables but it is not filtering between the dimensions (which I understand because there are not relationship between the dimensions and I cannot cross filter)

 

So how is to make it possible filter the two fact tables and and also the dimensions filtering each other? What I need to change in my data model?

 

Thanks! 🙂

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Changing the direction of the relationship between tables from single to both should work.If it doesn't meet your requirement, kindly share your sample data and excepted result to me. Please upload your files to One Drive and share the link here.

 

Capture.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi @v-frfei-msft,

 

Thanks for the reply. 

Unfortunately I can't share the data since it's confidential, but I have a picture of the model that might help. 

 

Example1_PBIForum.png

 

As you can see, the dimensions (that are also my slicers) are connected to my fact tables. But If I put 'Both' in cross filter direction I get:

 

 

Example2_PBIForum.png

 

 

Does it mean that I need to change my model?

 

Thanks!

 

Regards,

gojo

 

 

 

Anonymous
Not applicable

Workaround found in the official Power BI documentation "Bi-directional relationship guidance" for the data modeling, Chapter "Slicer items with data" . Without changing anything to the model (no bi-directional filter needed, therefore no risk of ambiguity in the model), but with the right filter setup in your (slicer) visual, I was able to solve a similar issue.

 


...

There's a better way to achieve the same result: Instead of using bi-directional filters, you can apply a visual-level filter to the Product slicer itself.

Let's now consider that the relationship between the Product and Sales table no longer filters in both directions. And, the following measure definition has been added to the Sales table.

Total Quantity = SUM(Sales[Quantity])

To show the Product slicer items "with data", it simply needs to be filtered by the Total Quantity measure using the "is not blank" condition.

...

Of course, you don't solve so the issue on the modeling level, but on the reporting layer. I found this solution anyway straightforward for my case. 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors