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
Jarlisle
Regular Visitor

Show a measure next to the dimension in a filter.

I would like to add a measure value next to the dimension in a filter. Use case is: if a user wants to know the impact of what the dimension value has on the visuals it would be nice to have that value in the filter itself.

 

Example: I have a page showing marketing analytics data and I want to filter by the source, but I want to show the number of pageviews that correspond to the source in the filter and I want the dimension (source) to sort by the number of pageviews. I know this can be done in a table and click on the table value, but I'd like to have it in a filter.

1 ACCEPTED SOLUTION

First thought was if you have an existing measure just to add a calculated column but you could build it in PowerQuery or at Source.

I mocked something very simply up:

 

bcdobbs_0-1644518303510.png

 

Created a Products Sold measure:

Products Sold = SUM ( Sales[Quantity] )

 

Then on the product dimension table added a calculated column with following dax:

 

Slicer Label = Product[Category] & " (" & [Products Sold] & ")"

 

You can then get this:

bcdobbs_1-1644518403342.png

Just be clear that because it's using a calculated column it won't respond to other filters.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

3 REPLIES 3
bcdobbs
Super User
Super User

You'd have to pre calculate it into your dimension table as a calculated column in order to use it in a slicer. That won't respond dynamically to other filters though. Apart from that you can't directly include a measure in a slicer.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

You're referring to doing that in the source, or are you thinking of doing that in Power Query?

First thought was if you have an existing measure just to add a calculated column but you could build it in PowerQuery or at Source.

I mocked something very simply up:

 

bcdobbs_0-1644518303510.png

 

Created a Products Sold measure:

Products Sold = SUM ( Sales[Quantity] )

 

Then on the product dimension table added a calculated column with following dax:

 

Slicer Label = Product[Category] & " (" & [Products Sold] & ")"

 

You can then get this:

bcdobbs_1-1644518403342.png

Just be clear that because it's using a calculated column it won't respond to other filters.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

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.