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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

how to use a measure in a slicer

Hello,

 

My table has a measure 25% MoM Flag = IF([MoM Delta %] >= 0.25, 1, 0). I want to make a slicer to show 0, 1, select all using this measure.  

I created a new table called "MoM Flag Ind", that has only one column "Flag_Ind' and two rows (1 and 0).  But I don't know how to connect the table to measure to make slicer work.

BarbaraYanChen_2-1741301997967.png

 

Can anyone help?  thanks.

 

Barbara

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @BarbaraYanChen 

Meaures don't have a row context and the values are evaluated based on othe other dimensions added together with it to a visual. There are techniques to make them appear like they can be used as dimensions but the actual approach depends on your use case. In the images below, a disconnected table with a column of values 0 and 1 is created and used in a slicer. The slicer selection is then compared with Flag measure in the table visual in a measure called  Flag Filter. The latter is used as a visual filter.

danextian_1-1741323414695.png

Flag Filter = 
IF ( [Flag] IN VALUES ( _Flag ), 1, 0 )

 

danextian_0-1741323397651.png

The Flag and Flag Filters are evaluated for each combination of Category and Geo columns so this won't work if used in a visual like a card which doesn't allow for such evluation to happen.

 

Please see the attached sample  pbix.

 

If this isn't what you're looking for, please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post  a link to an Excel file or a sanitized copy your pbix stored in the cloud.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Hi Danextian,

 

Thanks so much for your solution.  I looked at your powerbi example, and copied your steps, it worked well.

 

Thanks so much for your help!

 

Barbara

 

 

 

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

Hi @BarbaraYanChen 

Meaures don't have a row context and the values are evaluated based on othe other dimensions added together with it to a visual. There are techniques to make them appear like they can be used as dimensions but the actual approach depends on your use case. In the images below, a disconnected table with a column of values 0 and 1 is created and used in a slicer. The slicer selection is then compared with Flag measure in the table visual in a measure called  Flag Filter. The latter is used as a visual filter.

danextian_1-1741323414695.png

Flag Filter = 
IF ( [Flag] IN VALUES ( _Flag ), 1, 0 )

 

danextian_0-1741323397651.png

The Flag and Flag Filters are evaluated for each combination of Category and Geo columns so this won't work if used in a visual like a card which doesn't allow for such evluation to happen.

 

Please see the attached sample  pbix.

 

If this isn't what you're looking for, please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post  a link to an Excel file or a sanitized copy your pbix stored in the cloud.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hello Danextian,

 

I have made a slicer (25% MoM Flag) using your solution.  Now, can I have another question: to show Yes/No on the slicer instead of 1/0.

 

BarbaraYanChen_0-1741626615711.png

 

Thanks,

 

Barbara

Hi Danextian,

 

Thanks so much for your solution.  I looked at your powerbi example, and copied your steps, it worked well.

 

Thanks so much for your help!

 

Barbara

 

 

 

Ashish_Mathur
Super User
Super User

Hi,

I'd like to try.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Deku
Super User
Super User

If you are just trying to filter the table you could add a check to your [mom delta %] 

 

If( [25% mom flag] >= 0.25, [mom delta %] )

 

This returns blank if greater than 25% and the values will not show in the visual

 

You could also add the 25% measure to the filter pane on the visual filter and condition where result = 1.

 

Or do you want end users to be able to select from a slicer? 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors