Forum Discussion
Slicer to filter multiple values
Hi! So I'm looking to create a slicer in which one selection can affect multiple values.
For example I want to be able to click on one selection of a slicer lets say "Engineering Projects" and have it filter to show projects that are managed by Me, Jim, John and Bob. I have a column for Project Manager but not one that would contain Engineering Projects, would I need to create that column and populate it in order to make a slicer that can do this?
5 Replies
- AnonymousNot applicable
Assuming you, Jim, John, and Bob will always only have their projects considered as "Engineering Projects", ideally you'd have your project managers separated out into its own dimension table with that column describing each project manager. From there, your slicer on the type of project would filter down the project managers in that dimension, and then filter the relevant projects in your fact table.
Basically, yes, you'll need to add an attribute describing the projects as "Engineering Projects". If you want to take the easy way out, you can use the grouping feature to do this: https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning
- AnonymousNot applicable
If it wasn't only always going to me me, Jim John and Bob would there be anything I could do?
Sort of what I need is almost an if then statement for a slicer. Like if Engineering Projects is selected then filter on these managers.
If Manufacturing is selected then filter on these teams.
Is there any way to do this in powerbi currently?
- AnonymousNot applicable
Yeah, what you're after is pretty straightforward, but to give more details, I would probably need to see a sample set of data. You can use a custom column in Power Query to perform that exact if/else logic across multiple columns to add an additional column that the slicer can then use.