Forum Discussion
dynamically result label
Hi ,
I want to dislplay selected filters/selections made by User in a textbox. In order to achieve this I have used below query
Now, I have one doubt, From the table "ACHFB_SDM_PBI_V" I have few rows as below
Here, Even If nothing is selected by users, I want to display "All ACHFB", but I want to get rid of the highlighed data"Invalid","Not aplicable"" etc.
For that I need DAX,. Please help.
- Anonymous4 years ago
Hi Anonymous ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:
Label XX = IF ( ISFILTERED ( 'ACHFB_SDM_PBI_V'[ACHFB] ), CONCATENATEX ( FILTER ( VALUES ( 'ACHFB_SDM_PBI_V'[ACHFB] ), NOT ( 'ACHFB_SDM_PBI_V'[ACHFB] IN { "- - INVALID", "$ - NOT APPLICABLE", "- NOT AVAILABLE", "? - UNKNOWN" } ) ), 'ACHFB_SDM_PBI_V'[ACHFB], "," ), "All ACHFB" )Best Regards
2 Replies
- amitchandak
Super User
Anonymous , try to add filter concatenatex
example, add additional values
Label XX =
If(NOT(ISFILTERED(ACHFB_SDM_PBI_V[ACHFB])),"All ACHFB",Concatenate("ACHFB - ",If(ISFILTERED(ACHFB_SDM_PBI_V[ACHFB]),
calculate( CONCATENATEX(VALUES(ACHFB_SDM_PBI_V[ACHFB]),ACHFB_SDM_PBI_V[ACHFB],","), filter(ACHFB_SDM_PBI_V , not ACHFB_SDM_PBI_V[ACHFB] in {"--INVALID",""$_NOT APPLICABLE,"?-UNKNOWN"} ) ) ))) - AnonymousNot applicable
Hi Anonymous ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:
Label XX = IF ( ISFILTERED ( 'ACHFB_SDM_PBI_V'[ACHFB] ), CONCATENATEX ( FILTER ( VALUES ( 'ACHFB_SDM_PBI_V'[ACHFB] ), NOT ( 'ACHFB_SDM_PBI_V'[ACHFB] IN { "- - INVALID", "$ - NOT APPLICABLE", "- NOT AVAILABLE", "? - UNKNOWN" } ) ), 'ACHFB_SDM_PBI_V'[ACHFB], "," ), "All ACHFB" )Best Regards