Forum Discussion
Text field to show the selected filter
- 10 years ago
You can try a measure that return text. You need to add it in a table , matrix or card visual.
1. If you have a client column/table with unigue clients you can try this
Clients Filtered = IF ( HASONEVALUE ( Clients[ClientName] ); VALUES ( Clients[ClientName] ); "ALL" )2. If not you, you filter from fact table or other this option should work
Clients Filtered 2 = IF ( COUNTROWS ( VALUES ( Sales[Client] ) ) = 1; VALUES ( Sales[Client] ); "ALL" )Hope that helps
You can try a measure that return text. You need to add it in a table , matrix or card visual.
1. If you have a client column/table with unigue clients you can try this
Clients Filtered =
IF (
HASONEVALUE ( Clients[ClientName] );
VALUES ( Clients[ClientName] );
"ALL"
)2. If not you, you filter from fact table or other this option should work
Clients Filtered 2 =
IF (
COUNTROWS ( VALUES ( Sales[Client] ) ) = 1;
VALUES ( Sales[Client] );
"ALL"
)Hope that helps
It works with both of your ideas. Thank you konstantinos.
The only problem is when I set a filter with more than one customer there stands also "all". Do you have a idea to solve this problem?
- konstantinos10 years ago
Memorable Member
Just thinking & writing without testing.If not working a variation should work and sure is not optimal
Clients Filtered 3 =
SWITCH (
ISFILTERED ( Client[ClientName] );
COUNTROWS ( VALUES ( Client[ClientName] ) ) = 1; VALUES ( Client[ClientName] );
COUNTROWS ( VALUES ( Client[ClientName] ) ) > 1; CONCATENATE ( COUNTROWS ( VALUES ( Client[ClientName] ) ); " Clients" );
"ALL"
)
- kavyasree10 years agoRegular VisitorHi, I have tried with this code, but I am getting Error, Cant Compare text to string, And If I select 2 filtering options from my Slicer it is showing "All" If I need Single value which code need to use..?? Thanks