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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
nleuck
Post Patron
Post Patron

Slicer to filter data

Hello All,

 

I have a dataset with a list of product ids, branch locations, quantities, values, and etc. One particular column called is showroom vendor (values are "0" for not showroom vendor and "1" for is showroom vendor) I want to use as a slicer. The slicer I'm trying to create will default to "No" meaning show me all the data or select "Yes" meaning filter out those that are showroom vendor.

 

For some reason though I'm having a hard time coming up with something that works the way I need it to. I can easily just use the column is showroom vendor as the slicer but the users want it a specific way.

 

Any help would be greatly appreciated!

 

Thanks,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

That i believe is impossible. What you could do is create a slicer with just the option "Yes" and name it show vendor only or something. 

When yes is not selected it will show all the Yes and no's.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

You Can create value tables. And based on then you can change the filter in your measure.

One way change the filter based on the value another change measure that has a different filter

Measure =
var _sel = max(newTable[value])
var _me1 = calculate(sum(sale[amount]),sale[type]="Show room")
var _me2 = calculate(sum(sale[amount]))
return
if (_sel ="NO", [_me2], [_me1]

)

 

Change as per table and column name

Also refer

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

Anonymous
Not applicable

Option 1: Change all the 1's to Yes and 0's to No and use that as a slicer.

Option 2: Use a bookmark and a button. Where in the bookmark it filters the correct data.

Btw, if default is No i would expect all the sales without showroom vendor, not just all the sales.

@Anonymous 

 

The problem is defaulting to "No" only shows products that are not showroom vendors. What I'm creating is more of an exclusion. I need "No" to show all products and "Yes" to exclude those products that are showroom vendors. I'm not sure how to go about it. The users are very specific on wanting it to be a slicer. I brought up bookmarking it and that was a no.

Anonymous
Not applicable

That i believe is impossible. What you could do is create a slicer with just the option "Yes" and name it show vendor only or something. 

When yes is not selected it will show all the Yes and no's.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.