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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
chetan8080
Helper II
Helper II

DAX Measure Not Showing Correct Slicer State (All Selected, No Selection, Partial Selection)

Hello Power BI Community,

I am facing an issue with a DAX measure intended to dynamically display the state of a region slicer. The goal is to show one of three messages based on the user's selections.

My Goal

I want the measure to display:

  1. "Please select a region" when no items are selected in the slicer.

  2. "All regions selected" when all regions are selected.

  3. "Regions selected: [List of regions]" when one to nine regions are selected.

Here is the DAX measure I have created:

Selected Region Display =
VAR SelectedRegionsCount = COUNTROWS(VALUES('REGION TABLE'[REGION]))

RETURN
    IF(
        NOT ISFILTERED('REGION TABLE'[REGION]),
        "Please select a region",
        IF(
            SelectedRegionsCount >= 9,
            "All regions selected",
            "Regions selected: " & CONCATENATEX(VALUES('REGION TABLE'[REGION]), 'REGION TABLE'[REGION], ", ")
        )
    )

Working correctly for partial selections sa picture below:

chetan8080_0-1757939985428.png

 

Not working when nothing is selected 

chetan8080_1-1757940021932.png

 



1 ACCEPTED SOLUTION

Hi @chetan8080 , 

Thanks for the response.

Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., PBIX,Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.

Looking forward to your response.

Best regards,
Lakshmi.

 

View solution in original post

20 REPLIES 20
v-lgarikapat
Community Support
Community Support

Hi @chetan8080 ,

 

Thanks for reaching out to the Microsoft fabric community forum.

@MasonMA , @rohit1991 

Thanks for your prompt response

@chetan8080 , 

I wanted to follow up and confirm whether youโ€™ve had the opportunity to review the information  provided by @MasonMA , @rohit1991 . If you have any questions or need further clarification, please donโ€™t hesitate to reach out.

 

We appreciate your engagement and thank you for being an active part of the community.

Best regards,
Lakshmi.

HELLO @v-lgarikapat , I am still waiting for the solution

Hi @chetan8080 , 

Thanks for the response.

Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., PBIX,Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.

Looking forward to your response.

Best regards,
Lakshmi.

 

Hello Lakshmi, 
Thank you for the response, I am attaching a pbix file 

can you help me attaching the file? I cannot find an option to do it

chetan8080_1-1758174942659.png

 

chetan8080_0-1758178586628.png

Hello Lakhsmi,
I am getting an error of file type not supported.
can I please send the file to your email ID if possible?

Hi @chetan8080 Apologies for the delayed response.

 

Could you please upload the file to OneDrive and share the link here so that it will be easier to access the sample data file?

 

We appreciate your collaboration and support!

Best regards,
Lakshmi.

 

Hi @chetan8080 ,

Weโ€™d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please donโ€™t hesitate to reach out. Weโ€™re more than happy to continue supporting you.

We appreciate your engagement and thank you for being an active part of the community

 

 

Best Regards,

Lakshmi.

 

Hi @chetan8080 ,

Weโ€™d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please donโ€™t hesitate to reach out. Weโ€™re more than happy to continue supporting you.

We appreciate your engagement and thank you for being an active part of the community

 

 

Best Regards,

Lakshmi.

Hi @chetan8080 ,

 

Please find the attached screenshot for your reference, indicating where files can be uploaded.

vlgarikapat_0-1758175897722.png

Best Regards,

Lakshmi.

MasonMA
Community Champion
Community Champion

@chetan8080 

 

Hi, You can use this sample code,

 

But your end users would need to understand when None is selected (Select All not checked) it actually means everything is selected. 

Display = 
VAR SelectedRegionsCount =
    COUNTROWS(VALUES('Table'[REGION]))
VAR TotalRegionsCount =
    COUNTROWS(ALL('Table'[REGION]))
RETURN
    SWITCH(
        TRUE(),
        SelectedRegionsCount = 0, 
            "Please select a region",
        SelectedRegionsCount = TotalRegionsCount,
            "All regions selected",
        "Regions selected: " &
            CONCATENATEX(
                VALUES('Table'[REGION]),
                'Table'[REGION],
                ", "
            )
    )

MasonMA_0-1757942279493.png  MasonMA_1-1757942306767.png  MasonMA_2-1757942327962.png

 

 

 

 

 

Hi @MasonMA , thank you for responding.
I need the dax to display "Please select a region" when nothing is selected from the slicer.

Hi, then i would suggest disabling 'Select All' and use below sample code 

Display = 
VAR _SelectedRegions =
    VALUES('Table'[REGION])
VAR _SelectedRegionsCount =
    COUNTROWS(_SelectedRegions)
VAR _TotalRegionsCount =
    COUNTROWS(ALL('Table'[REGION]))
VAR _IsFiltered =
    ISFILTERED('Table'[REGION])
VAR _result=
    SWITCH(
        TRUE(),
        NOT _IsFiltered || _SelectedRegionsCount = 0,
            "Please select a region",
        _SelectedRegionsCount = _TotalRegionsCount,
            "All regions selected",
        "Regions selected: " &
            CONCATENATEX(
                _SelectedRegions,
                'Table'[REGION],
                ", "
            )
    )

RETURN _result

 

MasonMA_0-1757950128204.png    MasonMA_1-1757950149781.png

 

 

Hello @MasonMA 
this dax is not working as expected see below picture

chetan8080_0-1757951478666.png

When I select all it should show "All Regions Selected"

As i mentioned in last message, you would first need to disable using 'Select All' from Filter setup. because when 'Select All' is unchecked, it basically means everything is selected. 

Hi @MasonMA , I need to keep that "Select All" from filter setup, Is it possible to achieve to what I need with the keeping the "Select All" option enabled?
I have other slicers where they have too many values in slicers to select, so I cannot disable using "Select All" from filter.

Then i'd suggest using the first solution and educate your end users. Because from logic point of view, when 'Select All' is unchecked/nothing is selected, your message is supposed to display 'All region is selected' as this is actually the way your filter contexts applied on your report. correct?

No, when 'Select All' is unchecked/nothing is selected the message should be "Please Select a Region".
to be precise 

I want the measure to display:

  1. "Please select a region" when no items are selected in the slicer.

  2. "All regions selected" when all regions are selected.

  3. "Regions selected: [List of regions]" when one to nine regions are selected.

 

Hi @rohit1991  what would you think about this request? 

rohit1991
Super User
Super User

Hi @chetan8080 

In a default Power BI slicer:

  • If nothing is selected >> Power BI internally treats it as all selected.

  • If you click Select All >> the slicer state is also all selected.

Create Measure:

Selected Region Display = 
VAR RegionCount = COUNTROWS(VALUES('Sample Data'[Region]))
VAR TotalRegions = COUNTROWS(ALL('Sample Data'[Region]))
RETURN
SWITCH(
    TRUE(),
    RegionCount = 0, "Please select a region",
    RegionCount = TotalRegions, "All regions selected",
    "Regions selected: " &
        CONCATENATEX(VALUES('Sample Data'[Region]), 'Sample Data'[Region], ", ")
)

 

image.png

 

image.png

 

 


Did it work? โœ” Give a Kudo โ€ข Mark as Solution โ€“ help others too!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors