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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Change value in slicer based on value on another slicer

I have a Power BI report with two filters. One filter is the Power BI's default slicer filter (customized to dropdown). The other is a Chiclet Slicer from the Market Place. I want the options in my default slicer to change as the selected value in my chiclet slicer changes.

 

To explain more, here is the issue:

  1. My chiclet slicer is for unit of measure and has 4 options: Count, Pounds, Kgs, Metric Tons.
  2. The default slicer is for warehouse and has 3 options for one combination and 2 for another.
    1. Combo 1 Values: Warehouse A, Warehouse B, Warehouse C
    2. Combo 2 Values: Internal, External
  3. If I select Pounds, Kgs, or Metric Tons in Chiclet Slicer, my default slicer should be populated with Combo 1 values.
  4. If I select Count in my Chiclet Slicer, my default slicer should be populated with Combo 2 values.
  5. Combo 2 values is a calculated column based on the warehouse. Warehouse A and Warehouse B are Internal and Warehouse C is External. I already have a custom column with these values populated properly.

Solution expected:

My idea for this is to have a custom column that does a switch on SelectedValue of Chiclet Slicer and picks either column. Here is what I have right now:

 

WarehouseDynamic = SWITCH(
    SelectedValue(UnitOfMeasure[UoM])
    ,"Pounds", DataTable[WarehouseDefault]
    ,"Kgs", DataTable[WarehouseDefault]
    ,"Metric Tons", DataTable[WarehouseDefault]
    ,"Count", DataTable[WarehouseInternalExternal]
)

 

Problem with this is, I doubt SelectedValue works with a custom column. It only works with Measures. I cannot use a Measure because Measures only return aggregated numeric values or other measures, not columns. 

 

I would highly appreciate some assistance.

1 ACCEPTED SOLUTION
8 REPLIES 8
Namoh
Post Partisan
Post Partisan

I have a similar issue.

 

I have one slicer using a measure with 6 options from a table. Table has a second column called sorting.

 

The other slicers is using a different measure with also 6 options from a 2nd table. This table also has a second column called sorting.

 

Slicer 1 is used for changing graph 1, slicer 2 is used for changing graph 2.

 

I would like to use 1 of the 2 slicers to change both graphs at once.

 

The only link between them are the numbers in both Sorting columns.

 

Can I use 1 of the slicers (or create a complete new slicer) so both graphs change at the same time?

 

How to solve this?

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please let me know whether you have solved this problem.

 

 

Best Regards,

Icey

Anonymous
Not applicable

@Icey  From an answer above, I gathered that filtering one slicer through another is not possible. So we decided to change our business requirements to just have one of the two values in our slicer as a default. Your solution won't work for me because I need dynamic options in slicers, not dynamic axis titles. 

Thank you for your help.

Icey
Community Support
Community Support

Hi @Anonymous ,

 

If I understand you correctly, you can refer to this post: https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/td-p/86167. It does not exactly match your situation, but it can be used as a reference.

 

Or, you can share me a dummy PBIX file, removing sensitive information and real data, and I'll test for you.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@amitchandak  Hierarchical Slicer was new to me when you mentioned it, but unfortunately, there isn't really any correlation between the two slicer values. It was more of a business logic than a data logic, so we decided to change our business requirements to just keep one of the two values as the default, irrespective of the first slicer selection.

 

Thank you for your help and introducing me to Hierarchical slicers. I anticipate using this in the near future!

Greg_Deckler
Super User
Super User

Sample data would be tremendously helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

The options should change between slicers as long as they are set to cross filter for Edit Interactions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler The options won't change automatically, irrespective of cross-filtering because the two slicer values have no correlation. This was a business related connection between the two slicers, rather than a data based connection. So that doesn't work in my case, unfortunately.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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