Forum Discussion
Visually separate all filters applied with a comma
- Anonymous8 years ago
Hi guys
I read some other posts in the Forums and got inspiration to make this sentence:
Filters applied =
IF(ISFILTERED(Account[Account]);
"-Account: "& CONCATENATEX(VALUES(Account[Account]);Account[Account];", ")&
"
"
&
"
"
)
&IF(ISFILTERED('Application'[Application]);
"-Application: "& CONCATENATEX(VALUES('Application'[Application]);'Application'[Application];", ")&
"
"
&
"
"
)
&IF(ISFILTERED('Central Organization'[Business Division]);
"-Business Division: "& CONCATENATEX(VALUES('Central Organization'[Business Division]);'Central Organization'[Business Division];", ")&
"
"
&
"
"
)Don't mind the wierd line breaks. I'm connected directly to the cube which doesn't support Unicodes.
It actually works quite well when wrap text is applied and it's put in a table and also includes the values which have been filtered.
Looks like this:
- 8 years ago
Hi Anonymous,
Sorry about the last solution, I missed that. I'm glad you have found the solution.
Also, I've updated my code:
Filtro =
VAR _Filter = CONCATENATE(
CONCATENATE(
IF(ISFILTERED(Table1[DADO_1]); "Dados 1;"; BLANK());
IF(ISFILTERED(Table1[DADO_2]); "Dados 2;"; BLANK()));
IF(ISFILTERED(Table1[DADO_3]); "Dados 3;")
)
RETURN IF(ISBLANK(_Filter); ""; LEFT(_Filter; LEN(_Filter) - 1))
Hi Anonymous,
Sorry about the last solution, I missed that. I'm glad you have found the solution.
Also, I've updated my code:
Filtro =
VAR _Filter = CONCATENATE(
CONCATENATE(
IF(ISFILTERED(Table1[DADO_1]); "Dados 1;"; BLANK());
IF(ISFILTERED(Table1[DADO_2]); "Dados 2;"; BLANK()));
IF(ISFILTERED(Table1[DADO_3]); "Dados 3;")
)
RETURN IF(ISBLANK(_Filter); ""; LEFT(_Filter; LEN(_Filter) - 1))
That is beautiful.
Your new code is actually the best solution for the initial issue.
Thank you very much.