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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
cartercambest
New Member

Using a measure as a slicer

Hey All,

 

I am attemtping to use a measure on a slicer using a live connection data set.

 

The slicer I am attemtping to make would have three categories for Total Charges. 0 - 300, 301 - 999, 1000 +.

 

Please let me know if you have any suggestions.

 

Thank you,

3 REPLIES 3
Anonymous
Not applicable

@cartercambest 

 

Generally, a measure can't be used to create slicer directly. There are some workarounds, you can find them in the forum:

https://community.powerbi.com/t5/forums/searchpage/tab/message?filter=location&q=use%20measure%20sli...

 

However, since you are using live connection datasource. I am afraid current it is not possbile to meet your requirements.

 

Best, Regards

Paul Zheng

Greg_Deckler
Super User
Super User

@cartercambest as @FrankAT mentioned, in general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

 

However, since you are using a Live Connected dataset you can't do this. Is this Live or DirectQuery? Any chance you can switch to composite to add in the extra table you need?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
FrankAT
Community Champion
Community Champion

Hi,

  1. Create a disconnected table with your groups (see figure 1).
  2. Create a measure with SWITCH() (figure 2).
  3. Create the slicer (figure 3).
  4. Use the SWITCH() measure insice your visual.

04-03-_2020_00-25-10.png

 

 

 

 

Figure 1: Disconnected table

 

04-03-_2020_00-28-30.png

 

 

 

 

 

 

 

 

 

Figure 2: SWITCH()

 

04-03-_2020_00-29-53.png

 

 

 

 

 

 

Figure 3: Slicer

 

Regards Frank AT

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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