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
Yonko
Helper I
Helper I

Is there a way to filter one slicer by another one?

Hello. Ma problem for today is the next one.
There is a dataset with different corn and sunflower hybrids, and ma task is to create a scatter plot which shows deviation with different indicators relative to the selected hybrid. The indicators are humidity, oil production and productivity which are substituted to the graph axes. If i select some hybrid in slicer it will be placed into the center of graph and around it will be another hybrids, filtered by the choosen axes.

Yonko_0-1667816972546.png

 

All hybrids have data for productivity and humidity, but not all have data for oil production. And there comes the problem - in the hybrid slicer there are all names, and with productivity and humidity it works totally fine no matter which hybrid i'll choose, but if i choose some axis to oil production then hybrid slicer won't change and will show the same data, even if some of them have empty oil fields, and after picking them it will show empty space on graph, which isn't what i want.

Yonko_1-1667816987636.png

What i need is to somehow filter this slicer - so if i pick productivity and humidity it will show all hybrid names, but if i pick productivity and oil production it will show only hybrids without missing data. But the hybrid names is a column, and we can't filter it dynamically as a measure, also i can't put measure in slicer.
This is my model if it can be useful - i take data to the graph from base_2 and it should be filtered by base_3, but instead i made 3 other tables for different types of sunflower and corns, and data for X and Y axes are just field parameters. 

Yonko_0-1667817868542.png


Will be glad if you suggest me something. Of cource it can work with right model, but all dax code is kinda complicated and if i'll change model it could totaly destroy it (but i can try if you can suggest something).

 

1 ACCEPTED SOLUTION

Thanks for the respond. I guess you're right and ma scheme isn't very good - just the task was kinda complicated for me and this scheme was the only (partially) working solution that i found working. It should be rethinked, I'll try to do that.
Sunflower and Corn are summarized tabled, at first i wanted to make a simple distinct table with hybrid names but after rethinking added another filter parameters (which used in other slicers), hence why many-to-many.
About data or file - i'd like to share but the problem that i'm working with Russian language hence it won't be understandable for a lot of people.
And thanks for tip with measures - i guess that i knew it but totally forgot about this functionality, should try to work with it also.

View solution in original post

2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

@Yonko 

 

A good model is a star schema. If you deviate from this, there'll be more and more problems to solve (as you can see yourself right now). I can read from the picture above that you've got many-to-many connections between tables. Well, at first sight with all I know I'd say - the model should be changed. Why? Because many-to-many in Power BI has a very specific reason to be: to solve the problem of different granularities (do you have such a problem here?). And it should not be used for anyhing else with very, very few exceptions.

 

My models (professional and not) are almost exclusively star schemas and I never bump into problems that people who don't model data properly do. Please rethink your model. Also, please place a link here to a file on a shared drive (don't forget to give public access) with sample data so that people can play with it to suggest resolutions.

 

By the way, slicers can be filtered by measures. The measures are placed in the Filter Pane of the slicer, so yes, you can filter out all entries that you don't need based on a well crafted measure.

Thanks for the respond. I guess you're right and ma scheme isn't very good - just the task was kinda complicated for me and this scheme was the only (partially) working solution that i found working. It should be rethinked, I'll try to do that.
Sunflower and Corn are summarized tabled, at first i wanted to make a simple distinct table with hybrid names but after rethinking added another filter parameters (which used in other slicers), hence why many-to-many.
About data or file - i'd like to share but the problem that i'm working with Russian language hence it won't be understandable for a lot of people.
And thanks for tip with measures - i guess that i knew it but totally forgot about this functionality, should try to work with it also.

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.