cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nleuck Regular Visitor
Regular Visitor

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

Accepted Solutions
EricHulshof Member
Member

Re: Slicer to filter data

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
EricHulshof Member
Member

Re: Slicer to filter data

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.

nleuck Regular Visitor
Regular Visitor

Re: Slicer to filter data

@EricHulshof 

 

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.

EricHulshof Member
Member

Re: Slicer to filter data

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

Super User IV
Super User IV

Re: Slicer to filter data

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

 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors