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
Rygaard
Resolver I
Resolver I

Select / deselect (toggle) 1 specific customer on / off in a simple way

We have around 10K customers

one of this 10K we often need to switch off an since it is a hazzle to  have a slicer with 10K customrs, and then hit select all, then deselecting this one in the lower 2/3  of the list i want to find a better way

 

I thought about making a filter and then a bookmark, but then all the filters and sorting the customer have made will be lost each time i hit that button linking to a bookmark.

 

Idealy i want a button that has "customor YY - ON" and then Button "Customer YY OFF"  - not linking to a bookmark since that would also reset other filters.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi Rygaard

So you need the default view to be all customers, where you can include/excluse 1 specific customer with a toggle button. I've had this exact problem before, I simply solved it by doing the following:

- Create a new column in your data with the following DAX: NewColumn = IF(CustomerName = "Customer X"; "Customer X"; "All Customers").

Now you can create a slicer with this column. The slicer will have 2 values. The "All Customers" value should be ticked by default, where the "Customer X" should not be ticked by default, therefore not including it in the data. Once it is ticked it will include all customers including Customer X. 

Let me know if this helps!

View solution in original post

tex628
Community Champion
Community Champion

The method with the calculated column is generally something you would do in a dimension table. A table containing only the 10000 distinct customers and their customer related data. If you start creating several column in you main sales table you will proberbly get performance issues eventually. 


Connect on LinkedIn

View solution in original post

9 REPLIES 9
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Rygaard ,

Idealy i want a button that has "customor YY - ON" and then Button "Customer YY OFF"  - not linking to a bookmark since that would also reset other filters.

For your requirement, I think you need create the bookmark with button to achieve reset the slicers.

Please refer to this blog which should be helpful.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-piga-msft 

This has to be a robot postig since im specifik asking for a solution that do not reset filters, and you even quote me for that.

Anonymous
Not applicable

Hi Rygaard

So you need the default view to be all customers, where you can include/excluse 1 specific customer with a toggle button. I've had this exact problem before, I simply solved it by doing the following:

- Create a new column in your data with the following DAX: NewColumn = IF(CustomerName = "Customer X"; "Customer X"; "All Customers").

Now you can create a slicer with this column. The slicer will have 2 values. The "All Customers" value should be ticked by default, where the "Customer X" should not be ticked by default, therefore not including it in the data. Once it is ticked it will include all customers including Customer X. 

Let me know if this helps!

this is stupid simple ill use it 🙂

 

Though i still feel it do not solve real issue in Power Bi .. deselecting stuff....   I have over 2 million lines, where i now add a collum I feel from a Data Base point of view, that this is a bad solution... but right now i think its the best i have...

 

 

The solotion I had come up with before this was

1) create a filter on the page, then copying this to a new page with nothing on it but this filter, and syncing the filter

2) making sure the filter did not interact with any oter filters on the front page (Edit Interactions)

3) on the new filter page set up 2 bookmarks that did not change page  

4) hidding the filter on the front page

5) hidding the filter page

6) making 2 buttons on front page that linked to the two bookmarks, that then activated either the include or exclude bookmark

 

I really like this solution since it was 2 buttons on the front page, the down side is that i cannot see if its on / off.

 

tex628
Community Champion
Community Champion

Another tip, 

If you want to show that a bookmark button is selected, add another shape and then toggle visibility between them to change the color: 

UnselectedUnselectedSelectedSelected
Two shapes, placed ontop of eachother. 


Connect on LinkedIn
tex628
Community Champion
Community Champion

The method with the calculated column is generally something you would do in a dimension table. A table containing only the 10000 distinct customers and their customer related data. If you start creating several column in you main sales table you will proberbly get performance issues eventually. 


Connect on LinkedIn
tex628
Community Champion
Community Champion

If you make a calculated column in your customertable you can give that customer a "1" while giving every other customer a "0". Then use a slicer to remove that specific customer by selecting "0". 


Connect on LinkedIn
Anonymous
Not applicable

Hi

This can be solved in different ways. Should it be possible to select multiple customers at once, or do you only want to see one customer at a time?

@Anonymous 

there is one customer i want to be able to deselect or include.

so either:

view all customers including customer "YYY"

or:

view all customers but not customer "yyy"

 

since there is a ton of other filters, like segments, regions, dates, teams and so on i want an easy way to toggle this one customer on/off.

(the problem beeing that this customer is so big we often do not include it when we are looking at performance, since smalle departments performance would be drowned out by the volume from this one )

 

So some people need to look at the numbers without this customer  -   and yes i could make a slicer where you can then 

"select all" 

scroll down about 8K customers 

"Deselect this one i want do deselect"

 

but for the avarage user this is a hazzle.

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.