cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

Super User I
Super User I

what is the category measure calculation?





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

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)")))

Super User IV
Super User IV

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!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors