Forum Discussion
Slicer to filter multiple values
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
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?
- Anonymous8 years agoNot 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.
- Anonymous8 years agoNot applicable
I guess my only concern with doing it as a custom column would be if there was an overlap between a manager and a team.
So if a Customer Experience team was supposed to be in the customer experience selection of the slicer, but also had a manager that fit under the "Managed Services" selection of the slicer then only one of those two values could be declared in that custom column.
- v-jiascu-msft8 years agoMicrosoft Employee
Hi Anonymous,
Can you share a sample of your data? I think we can use a measure to work with IF statements.
Best Regards,
Dale