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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
bswylie
Helper I
Helper I

Measure names in slicer - filter for display in visual

This is an extension of a query I had on a specific format of data (kindly answered by @Datatouille ) - but since it's not the same topic - I've created a unique post to keep things mutually exclusive.

 

I have a small example model where I calculate a number of measures (cost, revenue, profit) with a time dimension as well (month).

 

Measures.PNG

 

I'd like to display these in a line chart - something like this - with a slicer with the measure names to be able to display whatever measure is selected:

 

Visual.PNG

 

Currently this is done not using the individual measures but by using a Total Amount measure which in this contrived repro model is just a SUM - but my actual model has many measures with completely different formulae - so I can't take quite the same approach.

 

How would I create a slicer that has a selection of measures, with the measures wired through to the visual?

 

I imagine one way to go about it would be to:

 

1) Create a dimension table for date using DISTINCT against source data

2) Manually create a dimension table with measure names

3) Cross join these into a new table

4) Lookup (CALCULATE with FILTER) values in the new table against the measures in the source data table

 

The problem I see with this is that my actual model has many dimension tables, and a cross join across all of these is going to lead to a massively huge additional dataset in Power BI. It doesn't seem like a very efficient way to do this. It would be much better to be able to create a slicer with measure names that can be selected to filter the visual.

 

Any thoughts? Is there any way to do this?

 

Example model can be found at

 

https://dl.dropboxusercontent.com/u/78036039/Slicer%20with%20Measures%20%26%20Columns%20-%20v3.pbix

 

 

1 ACCEPTED SOLUTION
tjd
Impactful Individual
Impactful Individual

1 REPLY 1
tjd
Impactful Individual
Impactful Individual

You might want to take a look at this article: Dynamically change the information within a visual via a slicer.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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