Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
When all of the Subjects Slicer's options are selected, the SelectedSubject2 card visual displays 'All Selected' and filters on all selected items. When all of the Subjects Slicer's options are not selected, the SelectedSubject2 card visual also displays 'All Selected' and appears to filter on selected items. Is there a better way to handle this second scenario, for example to change the Dax to display 'No Selection' and not filter on anything? In addition, can the 'All' be removed from the Dropdown box by the Dax without turning it off in the Slicer Settings.
Thanks in advance for any help provided.
(Below is the Dax, I am trying to follow the Dax from: https://p3adaptive.com/using-selectedvalues-capture-power-bi-slicer-selections/ )
Card Visual:
When all boxes are unchecked or all boxes are checked, the
Card Visual:
Or
Subjects Slicer:
Solved! Go to Solution.
Hi @PBIFanHook7,
Thank you for reaching out to the Microsoft Fabric Forum Community.
I’ve reproduced your scenario in Power BI Desktop and was able to achieve the expected output as per your requirements:
For your reference, I’ve attached the .pbix file that includes the sample data, DAX measures, and visuals configured to meet your requirements. You can download it and test it on your end.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hi @PBIFanHook7,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @PBIFanHook7,
May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @PBIFanHook7,
Thank you for reaching out to the Microsoft Fabric Forum Community.
I’ve reproduced your scenario in Power BI Desktop and was able to achieve the expected output as per your requirements:
For your reference, I’ve attached the .pbix file that includes the sample data, DAX measures, and visuals configured to meet your requirements. You can download it and test it on your end.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Thank you for your help.
Hi @PBIFanHook7 ,
To make this change you need to make use of the ISFILTERED function not sure how you have the expression done but use something similar to this:
SelectedSubject2 = SWITCH(
TRUE(),
ISFILTERED(MergedTable[Subjects]) && COUNTROWS(ALLSELECTED(MergedTable)) = COUNTROWS(ALL(MergedTable[Subjects])), "All Selected",
ISFILTERED(MergedTable[Subjects]), CONCATENATEX(
ALLSELECTED(MergedTable[Subjects]),
MergedTable[Subjects],
", "
),
"No Selection"
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for the suggestion.
Is there a better way to handle this second scenario,
Not really. "All selected" is the same as "nothing selected" - one of the major design decisions in Power BI.
To make this even more salty there is a ephemeral third state "nothing selected YET" with @MFelix 's suggestion of ISFILTERED playing a certain role. But you will find this to be a good way to waste your time. Instead, change your approach and eliminate the need for this.
Thanks for the information.
User | Count |
---|---|
84 | |
75 | |
69 | |
48 | |
39 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |