Forum Discussion
hummingbird
2 years agoHelper II
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 comp...
CoreyP
2 years agoSolution 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.
hummingbird
2 years agoHelper 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.