Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

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

Label XX =
If(NOT(ISFILTERED(ACHFB_SDM_PBI_V[ACHFB])),"All ACHFB",Concatenate("ACHFB - ",If(ISFILTERED(ACHFB_SDM_PBI_V[ACHFB]),CONCATENATEX(VALUES(ACHFB_SDM_PBI_V[ACHFB]),ACHFB_SDM_PBI_V[ACHFB],",")))) 
 
From the above DAX  , I achieve following result ,if nothing selected from that table , it displays "All ACHFB"
If something is selected , like - Sofa, Bed etc then it displays in texbox "Sofa, Bed".

Now, I have one doubt, From the table "ACHFB_SDM_PBI_V" I have few rows as below
Tinkle_1-1656676313864.png

 

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.


 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not 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"
)

yingyinr_0-1656997635918.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not 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"
)

yingyinr_0-1656997635918.png

Best Regards

amitchandak
Super User
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"} ) ) )))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.