March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
EDIT: I've solved it using https://community.fabric.microsoft.com/t5/Desktop/Slicer-with-AND-condition-in-Power-BI-instead-of-O... but the default view of the table when none of the slicers are selected are for personnel who have done all 6 courses. How do I change this so it shows all the data instead?
DAX Measure used:
I applied the measure to the table so it shows items when the measure isn't blank. The measure works if I select multiple courses:
But when none of the slicers are selected the default view shows personnel who have done all 6 courses whereas I would like the default view to show all the data.
Currently:
Goal:
Previous information for context:
I'm trying to solve an issue where I would like to see personnel in the company who are qualified for multiple courses however the default slicer selection uses the "OR" condition. I've found a few solutions online https://radacad.com/slicer-with-and-condition-in-power-bi however I can't seem to get this to work since the tables aren't directly related. Below is the sample data:
Course table:
Reference table:
I split this column via delimitir into separate rows:
I also created a definition table:
The relationship between the tables:
Currently the slicer works if I'm just selecting one value:
I would like the slicer to work so that when I select Course 1 and Course 2 I can see only names of people who have done both courses however right now it's showing people who have done either Course 1 or Course 2.
I've also attached the Sample Data and PBIX. Help.pbix Sample Data.xlsx
Thank you!
Solved! Go to Solution.
Hi @Xairan
Thanks for the reply from Thennarasu_R .
@Xairan , the following testing is for your reference.
Create another measure as follows
condition1 =
VAR _countSelected = CALCULATE(COUNT(Definition[Course]), FILTER('Definition', ISFILTERED(Definition[Course])))
return
IF(_countSelected = 0, 1, IF(_countSelected = [condition], 1, 0))
Put the condition1 into the visual-level filters, set up show items when the value is 1.
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Xairan
Thanks for the reply from Thennarasu_R .
@Xairan , the following testing is for your reference.
Create another measure as follows
condition1 =
VAR _countSelected = CALCULATE(COUNT(Definition[Course]), FILTER('Definition', ISFILTERED(Definition[Course])))
return
IF(_countSelected = 0, 1, IF(_countSelected = [condition], 1, 0))
Put the condition1 into the visual-level filters, set up show items when the value is 1.
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Awesome - thanks for that! Worked perfectly 🙂
Hi @Xairan
Can you explain the little brief your scenario as well Can send your exception output with dummy data in excel from below attcahed SS.
Thanks,
Thennarasu R
Hey,
I've attached the files here Help.pbix Sample Data.xlsx
I've actually solved the first section myself - finding out who has done multiple courses selected however just trying to find out how to have the default view showing all the data in the table instead of everyone who has done all courses.
Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |