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
erihsehc
Helper III
Helper III

can slicer select different measure?

hi there,

 

Currently seems that slicer can only select the items contain in one column, it that possible to select different measure? for example, I want to switch item in the visuals between sales and GP (2 measures), when I click "sales" all visuals changed to sales value. I think there is a solution to copy 1 set of data, create a column differentiate 2 items-sales and GP, but it will make the data model size much bigger.

 

I wondered if it is possible to create a slicer to switch the value between "sales" and "GP" from 2 measure, then no need to revise the data model. thanks

 

Best regards,

ER

1 ACCEPTED SOLUTION

Hi @erihsehc

 

Please find the link to my blog post below.

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
GilbertQ
Super User
Super User

Hi @erihsehc

 

THis is most certainly possible.

 

I am going to blog about it next week, with detailed steps on how to do it, as there are quite a few steps to follow but not too complex.

 

  1. You need to create a disconnected table.
    1. This will have the measure names, EG: Sales
  2. Then you need to create your measures.
    1. Sales = SUM('Sales Table'[Sales Amount])
  3. Next you create a measure which will take the values from your disconnected table, and depending on what is selected will use that measure.
    1. Here is an example of the measure:
    2. Selected Measure = 
      VAR MySelection =
          SELECTEDVALUE ( 'Measure Selection'[Measure Name], "Sales" )
      RETURN
          SWITCH (
              TRUE (),
              MySelection = "Sales", [Sales],
              MySelection = "Costs", [Costs],
              MySelection = "Margin", [Margin],
              [Sales]
          )
      		
  4. Then finally create a slicer from the disconnected table, so when you click on the slicer, it will then dynamically select the measure.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thanks @GilbertQ. Would you paste the link of the blog below when the detailed instruction is available? it is a bit complicated to apply this trick. It is amazingMan Happy

Hi @erihsehc

 

Sure will do so, it will probably be tomorrow





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi @erihsehc

 

Please find the link to my blog post below.

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

thanks a lot @GilbertQ, it is very helpfulMan Happy

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.

Top Solution Authors
Top Kudoed Authors