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

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.


Quality over Quantity


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


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

 

EricHulshof
Solution Sage
Solution Sage

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.


Quality over Quantity


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


@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.

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.


Quality over Quantity


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


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.