Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I need some assistance with a DAX measure. I feel like what I want to do is possible, but I'm not sure how to do it.
For simplicity's sake, let's say I have a table that looks like this:
Presentation | Name | Room | Start | End | Date |
Science 1 | Ann | E123 | 8:00 | 8:50 | 6/1/2022 |
Science 2 | Betty | E125 | 9:00 | 9:50 | 6/1/2022 |
Science 3 | Carol | E127 | 10:00 | 10:50 | 6/1/2022 |
Tech 1 | Denise | W123 | 8:00 | 8:50 | 6/1/2022 |
Tech 2 | Esther | W125 | 9:00 | 9:50 | 6/1/2022 |
Tech 3 | Fran | W127 | 10:00 | 10:50 | 6/1/2022 |
Engineering 1 | Fran | W123 | 10:00 | 10:50 | 6/1/2022 |
Engineering 2 | Esther | W125 | 8:00 | 8:50 | 6/1/2022 |
Engineering 3 | Denise | W127 | 9:00 | 9:50 | 6/1/2022 |
Math 1 | Carol | E123 | 10:00 | 10:50 | 6/1/2022 |
Math 2 | Betty | E125 | 8:00 | 8:50 | 6/1/2022 |
Math 3 | Ann | E127 | 9:00 | 9:50 | 6/1/2022 |
I want to have a slicer with the room options, and when I select a value in that slicer, it triggers a measure calculation that returns TRUE/1 for any person using that room in the table. For example, if I select room E123, since both Ann and Carol have a presentation in that room, it would mark all rows for Ann and Carol as TRUE.
I've tried doing this by manipulating slicer filtering:
Unfortunately, "Select All" on a slicer also selects any undisplayed items as well. Counter-intuitive in my opinion, but the fact of the matter is it makes using just slicers not work.
Anyone have thoughts? Nudges as to the right DAX formulas/expressions that might work?
Solved! Go to Solution.
Hi @cwollett ,
Try this:
Room Slicer = VALUES('Table'[Room])
Measure =
VAR SelectedRoom_ =
VALUES ( 'Room Slicer'[Room] )
VAR RelatedName_ =
SUMMARIZE (
FILTER ( ALL ( 'Table'[Name], 'Table'[Room] ), [Room] IN SelectedRoom_ ),
[Name]
)
RETURN
IF ( MAX ( 'Table'[Name] ) IN RelatedName_, 1 )
For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cwollett ,
Try this:
Room Slicer = VALUES('Table'[Room])
Measure =
VAR SelectedRoom_ =
VALUES ( 'Room Slicer'[Room] )
VAR RelatedName_ =
SUMMARIZE (
FILTER ( ALL ( 'Table'[Name], 'Table'[Room] ), [Room] IN SelectedRoom_ ),
[Name]
)
RETURN
IF ( MAX ( 'Table'[Name] ) IN RelatedName_, 1 )
For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Unfortunately that does not work. The filter cannot be tied to the table or it filters out more rows than I'd like. In the image above, I don't have that filter acting on that table.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |