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

Choose between measures in a slicer

Hi,

 

In a table, I have sales in Value, Volume and Units in different columns. In the table and/or chart, I would like to be able to choose if I want to see Value, Volume or Units in a filter of a slicer

 

Is that possible?

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

Hi @Anonymous,

 

You can refer to below steps to achieve your requirement:

 

1. Create a Selector table as source of slicer.

Selector = UNION(ROW("Type","Amount"),ROW("Type","Value"),ROW("Type","Unit"))

9.PNG

 

 

2. Write measure to original table to choose display item based on slicer.

Dynamic Display = 
var selectitem=IF(HASONEVALUE(Selector[Type]),VALUES(Selector[Type]),BLANK())
return
SWITCH(selectitem,"Amount",MAX('Table'[Amount]),"Unit",MAX('Table'[Unit]),"Value",MAX('Table'[Value]),BLANK()) 

 

3. Create table visual and slicer.

10.PNG

 

Result:

11.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

10 REPLIES 10

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.