Forum Discussion
Hide Client Names when Client Selected
Hi all, a very exciting question that has previously been discussed but I could not find a defined solution.
I have a relatively extensive table with client data that I want to visualise and compare each client side by side, here is a simplified snapshot:
| Name | Value |
| Albert | 232 |
| Mark | 5224 |
| Hannah | 245 |
Is there any method that will allow me to select the customer name on the slicer and it will hide the names of other customers, but the one(s) selected? For example, if Hannah is selected, the graph and visuals will look like this:
| Name | Value |
| Other Client | 232 |
| Other Client | 5224 |
| Hannah | 245 |
Thank you.
9 Replies
- parry2kSuper User
hummingbird are you going to slice the data by another dimension as well, or just customer selection is the requirement?
- hummingbirdHelper II
Potentially by other dimensions / columns in the table but there always will be a Client slicer that defines which names to show. If nothing selected then show all names.
- parry2kSuper User
hummingbird what is the unique customers count? I'm trying to see what is feasible here.
- CoreyPSolution Sage
Do you mean something like this?
I did this by creating a measure like so:
Selected Client = SWITCH( TRUE() , AND( HASONEVALUE( Clients[Client] ) , SELECTEDVALUE( Clients[Client] ) = SELECTEDVALUE( ClientData[Name] ) ) , SELECTEDVALUE( ClientData[Name] ) , AND( HASONEVALUE( Clients[Client] ) , SELECTEDVALUE( Clients[Client] ) <> SELECTEDVALUE( ClientData[Name] ) ) , "Other Client" , SELECTEDVALUE( ClientData[Name] ) )As it's using a measure to display the client's name ( an axis value ), the visual needs to know which client is being selected on the row. You can use an ID field to add the context needed by the visual without supplying a hard name value. Your slicer would then reference a table of client names that is disconnected from the model, i.e) no relationship to your fact table.
- hummingbirdHelper II
This is exactly what I am refering to, thank you. However, I cannot use this measure in the bar chart and when I select a name, the full list of customers (even with no data in the given period) is pulled up.
- hummingbirdHelper II
parry2k I have around 1k distinct customers that vary throughout months of the year. Ideally I only want to be able to select customers that have purchased in the given period - defined by the period slicer
- parry2kSuper User
CoreyP Indeed this is a great solution but I wanted to avoid the measure in case this needs to be used in a matrix visual or some other places as a column and that was the reason I asked the number of unique clients to come up with a solution. I had a working copy based on the model (not measure) but waiting on the OP's reply.
Great solution though. Cheers!!
- CoreyPSolution Sage
Oh, fascinating! I'd like to see what you came up with. I'm guessing it leverages What-If Parameters?