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

Change or switch slicer selection based on another slicer?

I created a table using "New Parameter" and added four fields (measures): Total Electricity (kWh), Total Electricity (kBTU), Total Tenant Electricity (kWh), and Total Tenant Electricity (kBTU).  I also added a column to the end of the parameter with the strings: kWh or kBTU depending on the measure's units. 

 

Here's the table: 

 

Electricity Indicator Selection = {
    ("Total Electricity (kWh)", NAMEOF('Measures Table'[Total Electricity (kWh)]), 0, "kWh"),
    ("Total Electricity (kBTU)", NAMEOF('Measures Table'[Total Electricity (kBTU)]), 1, "kBTU"),
    ("Tenant Electricity (kWh)", NAMEOF('Measures Table'[Tenant Electricity (kWh)]), 2, "kWh"),
    ("Tenant Electricity (kBTU)", NAMEOF('Measures Table'[Tenant Electricity (kBTU)]), 3, "kBTU")
}
 
Next I created two slicers:
 
Slicer 1 Units: uses the column with strings kWh / kBTU
Slicer 2 Measures: uses the measure column
 
Both of these slicers are set to single selection, and I edited the interaction in the Format pane so that the Slicer 2 Measures cannot interact with the Slicer 1 Units.   So when kBTU is selected from the Slicer 1 Units, the Slicer 2 Measures with kBTU show up, and likewise for kWh as seen below: 
 
PowersBI_1-1691439795836.png

 

The problem is that when the Slicer 2 Measure is selected (using the above example) and I select "kWh" from the Slicer 1 Units, Slicer 2 Measure stays populated with Total Electricity (kBTU) and my visual goes blank.  (see below)

 

PowersBI_2-1691440174522.png

 

When I select "kWh" in the Slicer 1 Units, I want the previously selected measure "Total Electricity (kBTU)" to change to "Total Electricity (kWh)." 

 

Does anyone know of a solution that builds onto my inital setup -- or is there some alternative method that I'm missing?  I was exploring using a measure with SELECTEDVALUE and conditional statement to use as a Filter on this visual, but I haven't been able to get it working.  

 

Thank you in advance for the help! 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @PowersBI ,

 

Based on my testing, this feature is not supported yet when the slicer is radio-selected. You can change the slicer to check and then create a metric to filter on it. When you filter units on slicer 2, slicer 1 will only show one option, at which point you will need to manually select that option.

Flag = 
 var _a=SELECTEDVALUE('Parameter'[Value4])
var _b=SELECTEDVALUE('Parameter'[Parameter Order])
return  SWITCH(TRUE(),
AND(_a="kWh" , _b=0),1,
AND(_a="kBTU" , _b=1),1,
ISFILTERED('Parameter'[Value4])=FALSE(),1,0)

vtangjiemsft_0-1691560133546.png

vtangjiemsft_1-1691560323464.png

 

If you would like to suggest  feature improvements, you may  vote the idea and comment here to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Neeko Tang

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

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @PowersBI ,

 

Based on my testing, this feature is not supported yet when the slicer is radio-selected. You can change the slicer to check and then create a metric to filter on it. When you filter units on slicer 2, slicer 1 will only show one option, at which point you will need to manually select that option.

Flag = 
 var _a=SELECTEDVALUE('Parameter'[Value4])
var _b=SELECTEDVALUE('Parameter'[Parameter Order])
return  SWITCH(TRUE(),
AND(_a="kWh" , _b=0),1,
AND(_a="kBTU" , _b=1),1,
ISFILTERED('Parameter'[Value4])=FALSE(),1,0)

vtangjiemsft_0-1691560133546.png

vtangjiemsft_1-1691560323464.png

 

If you would like to suggest  feature improvements, you may  vote the idea and comment here to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Neeko Tang

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

 

 

@v-tangjie-msft Thanks for investigating Neeko-- I will definitely search and post on the idea board to see if this feature is on the radar for a future update. 

This is actually a big limitation to an easy user interface when it comes to units or other category filters with multiple measures in a slicer.  

 

I guess for now I will remove the unit slicer and just live with a cluttered drop-down slicer that includes all the measures with both units. 


I guess I could also create a card with conditional text that prompts the user to select a new field when the visual goes blank with the previous selection -- although this would still be an extra click or two on the slicer. 

The only other thing I can think of right now is to give each measure its own visual and then use the unit slicer to change all the visuals at once -- but there will be a decrease in performance compared to wrapping the measures up in one slicer and one visual.

 

womp oh well -- thanks again! 

 

Hi @PowersBI ,

 

Your idea is a good one! Has your problem been solved? If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. Thanks in advance.

 

Best Regards,

Neeko Tang

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.