Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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:
"Please select a region" when no items are selected in the slicer.
"All regions selected" when all regions are selected.
"Regions selected: [List of regions]" when one to nine regions are selected.
Here is the DAX measure I have created:
Working correctly for partial selections sa picture below:
Not working when nothing is selected
Solved! Go to 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.
Hi @chetan8080 ,
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
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.
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
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.
Best Regards,
Lakshmi.
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],
", "
)
)
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
Hello @MasonMA
this dax is not working as expected see below picture
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:
"Please select a region" when no items are selected in the slicer.
"All regions selected" when all regions are selected.
"Regions selected: [List of regions]" when one to nine regions are selected.
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], ", ")
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.