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
jmarcrum
Helper II
Helper II

Use Measure as Slicer

Hi everyone -

 

I am trying to use the text values from a measure in a slicer on my table visual.  I created a separate table called "Category" that holds the possible text values from the measure and am able to filter the visual one at a time using the following formula on my visual level filter:

 

Category Selection = IF(SELECTEDVALUE(Category[Value])=[Category Measure],1,0)

 

Is there a way to filter on multiple values? 

See screenshots below with my steps.

 

Thank you in advance!

 

Table visual

table visualtable visual

 

measure slicer

measure slicermeasure slicer

 

filter on single value

filter on a single valuefilter on a single value

 

filter on multiple values

filter on multiple valuesfilter on multiple values

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @jmarcrum ,

 

We can change the measure as following to meet your requirement:

 

Category Selection =
IF ( [Category Measure] IN DISTINCT ( Category[Value] ), 1, 0 )

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lid-msft
Community Support
Community Support

Hi @jmarcrum ,

 

We can change the measure as following to meet your requirement:

 

Category Selection =
IF ( [Category Measure] IN DISTINCT ( Category[Value] ), 1, 0 )

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vanessafvg
Super User
Super User

what is the category measure calculation?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Category Measure =
IF(ISBLANK(CBM_ROUTES_2[X_DELTA]),"not enough data",
IF([X_MAX_BW_X_FOR]<[X_AVG_DAYS_BTW_MEASUREMENTS],"Not performed often enough",
IF([X_MIN_BW_X_FOR]>[X_AVG_DAYS_BTW_MEASUREMENTS],"Performed too often","OK (within bandwidth)")))

Greg_Deckler
Super User
Super User

So many times you can do something like:

 

VAR __Selections = 'Slicer'[Categories]

 

Then you can do a filter like:

 

FILTER('Table',[Column] IN __Selections)


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler could you give a more specific explanation? tnahk you!

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.