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
Moulick
Frequent Visitor

Filter slicer based on the another slicer

I want to know that there is any way using which i can filter the slicer records based on
the another slicer value selection.

 

Eg. I want to keep the selection of vegetable,fruits
and on the basis of the selection of the vegetable or fruits the next slicer should
filter the records in the next filter like vegetable -> potato,cabbage,brinjal
and Fruit -> apple,mango,banana.

10 REPLIES 10
Deepa
Frequent Visitor

I want to bind values for second slicer based on first slicer, How can I do this? my data is as in below table, In first slicer I am displaying Filter By types and in second slicer I have display the values based on filter by type. For example if i select city in first slicer(Filter BY slicer), I need to display all the cities in second slicer(Values Slicer). Capture.JPG

 

BhaveshPatel
Community Champion
Community Champion

Yes. You can do that.

 

You need to create two slicers for the requirement. For example, one for the Vegetables and Fruits & one for their names.

 

Just to clarify, it does not automatically recognize the names of the vegetables and fruits & you need to predefine them in your columns.

 

 

Filter on one slicer will automatically cross filter other slicer and that's the native behaviour of PowerBI.

Hope this has clarified your understanding.

 

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks for replay Bhavin Patel,

 

 The solution you provided it can't be used, as there is no relation between the tables, because it contains the duplicate values in the column.

 

 

Thank you 

Patel Moulick

 

 

 

Hi Moulick,

 

Can you please post the sample data and expected output to provide you the exact solution.

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks for replay Bhavesh Patel,

Here is my senario. which will know what i want.

Sample records
Table 1
vegetable
Fruits
Total

Table 2
brinjal
cabbage
potato
apple
mango
banana

- Here i want to keep the table1 in the slicer and on the select of vegetable or fruits.
- The record should be filter in the 2nd slicer.
Eg. IF vegetable selected then brinjal,cabbage,potato.
IF fruits selected then apple,mango,banana.
Note(There is no relation beteween this two tables , and cant create any relation)

Output:-

On selection of vegetable in the slicer 1 then the slicer 2 should filter with brinjal,cabbage,potato.
and
on selection of fruits in the slicer 1 then the slicer 2 should filter with apple,mango,banana.

(Logically as on the bases of the one slicer i have to filter the records in the slicer 2)

 

or there is any way that i can apply column level filter to the slicer, so when i select vegetable it filters and shows records as per the filter.

 

Thank you 

Moulick Patel

Hi @Moulick,

In your scenario, firstly, please create another link table as follows.
1.PNG

Secondly,  create relationship between the link table and Table 2.
2.PNG

Thirdly,  create slicers using relevant columns. For more details, please review the example in this attached PBIX file.
3.PNG


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft Hi Lydia,

 

I have a question about this what if besides fruit and vegetable you have other things as well.

For example:

Fish but this one does not expand into any drop-down check box and will be on the same level with fruits and vegetables?

 

It works only if you are using 2 slicers in a report, It doesn't work if you display some other data along with this in another visuals. 

Thank you Lydia Zhang,

 

As per your poc.  new link table i have created,

And what if i want to keep the all option in the first slicer selection too. 

If i want both to selected at once as vegetable and fruits using all option in it.

 

Thnak You 

Moulick Patel.

 

 

Hi @Moulick,

Just press Ctrl on your keyboard, then click the other option in the first slicer.

4.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.