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

Measure values as Slicer

Is it possible to use multiple measure values as a slicer filter?

 

I have 4 measures:

1. Linehaul Cost

2. Accessorial Cost

3.Total Cost

4.Misc Cost

 

I can only use a slicer for one measure but even then it shows as the values and not the column header. Is it possible to use a slicer to select the measure name?

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous ,

 

you can create a table that has just one column and 4 rows, namely the names of the measures.

Then you can add this column to a slicer, assuming you named the column c and the table t you can create a measure m1 like so:

m1 = SELECTEDVALUE('t'[c] , "default measure")

Create a 2nd measure m2 like so: 

m2 = 
SWITCH(
[m1]
, "default measure" , [Linehaul Cost] -- assuming that the measure [Linehaul Cost] is the default measure, if no measure is selected from the slicer
, "Linehaul Cost" , [Linehaul Cost]
, "Accessorial Cost" , [Accessorial Cost]
, "Total Cost" , [Total Cost]
, "Misc Cost" , [Misc Cost]
)

Now you can use the measure m2 in all your visuals, and it will show the value of the selected "measure" from the slicer.

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @Anonymous ,

 

you can create a table that has just one column and 4 rows, namely the names of the measures.

Then you can add this column to a slicer, assuming you named the column c and the table t you can create a measure m1 like so:

m1 = SELECTEDVALUE('t'[c] , "default measure")

Create a 2nd measure m2 like so: 

m2 = 
SWITCH(
[m1]
, "default measure" , [Linehaul Cost] -- assuming that the measure [Linehaul Cost] is the default measure, if no measure is selected from the slicer
, "Linehaul Cost" , [Linehaul Cost]
, "Accessorial Cost" , [Accessorial Cost]
, "Total Cost" , [Total Cost]
, "Misc Cost" , [Misc Cost]
)

Now you can use the measure m2 in all your visuals, and it will show the value of the selected "measure" from the slicer.

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.