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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Slicer to Exclude Binary item

Have a super simple column (10 rows total, 9 are equal to '1' and one value is equal to '0'). I want to use a single select slicer to either select all values ( i.e., all '1' and all '0') or select only rows with a '1' (and exclude the '0'), Any advice?

1 ACCEPTED SOLUTION

Hey @Anonymous ,

 

to create something like this:

image.png

create a table like so (in my example i call this table binaries slicer):

image.png

Create a relationship between the new table "binaries slicer" and your table like so:

image.png

 

image.png

This approach solely relies on data modeling, this makes creating measures more simple.

But you have to be aware that using many-to-many relationships has to be especially considered for certain kind of measures, e.g. one that uses the function RELATED.

 

From my personal experience the advantages using the data modeling (many-to.many) approach outweigh an approach based on measures, but as I already mentioned: you have to be aware that you're are using a many-to-many rellationship in your data model.

 

I strongly recommend watching these videos about relationships

Hopefully, my approach helps to tackle your challenge.

 

Regards,
Tom

 


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

Not sure I got it, In slicer, you have the option for single select, refer: https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers#selection-controls-...

Anonymous
Not applicable

Let's say my data looks like the table below. I need the slicer to be a sinle select with two options: the first - 'show all items' which shows the both 1 and 0 items. the second - ' show just 1's' that exlcudes the 0

 

item 1

1
item 20
item 31
item 41

Hey @Anonymous ,

 

to create something like this:

image.png

create a table like so (in my example i call this table binaries slicer):

image.png

Create a relationship between the new table "binaries slicer" and your table like so:

image.png

 

image.png

This approach solely relies on data modeling, this makes creating measures more simple.

But you have to be aware that using many-to-many relationships has to be especially considered for certain kind of measures, e.g. one that uses the function RELATED.

 

From my personal experience the advantages using the data modeling (many-to.many) approach outweigh an approach based on measures, but as I already mentioned: you have to be aware that you're are using a many-to-many rellationship in your data model.

 

I strongly recommend watching these videos about relationships

Hopefully, my approach helps to tackle your challenge.

 

Regards,
Tom

 


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

THANK YOU!

@Anonymous ,

All is not an option in single select you have to create a workaround. Find: https://www.dropbox.com/s/c77thcwi1j3pjb8/singleSelectAll.pbix?dl=0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.