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.
I would like to create a slicer that pulls through all all records if they have a value in one of two columns. For example if the below data was in PowerBi, if I selected "Red" it would pull through User 1, 5 and 6 records. Is this possible?
User | Primary Colour | Secondary Colour |
1 | Red | |
2 | Yellow | |
3 | Blue | Green |
4 | Green | Yellow |
5 | Purple | Red |
6 | Orange | Red |
Solved! Go to Solution.
Hi, @billybob12
I am glad to help you.
You can follow the steps below and hopefully it will help you!
First, you need to create a Custom Column Combined Colour in Power Query:
if [Primary Colour] = null then [Secondary Colour]
else if [Secondary Colour] = null then [Primary Colour]
else [Primary Colour] & "," & [Secondary Colour]
Then create another Custom Column Colors:
Text.Split([Combined Colour],",")
Click Expand to Rows:
You can drag the Custom Column Colors to the Field in Slicer to filter the data:
I've attached the pbix file for this example below, hope it helps!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @billybob12
I am glad to help you.
You can follow the steps below and hopefully it will help you!
First, you need to create a Custom Column Combined Colour in Power Query:
if [Primary Colour] = null then [Secondary Colour]
else if [Secondary Colour] = null then [Primary Colour]
else [Primary Colour] & "," & [Secondary Colour]
Then create another Custom Column Colors:
Text.Split([Combined Colour],",")
Click Expand to Rows:
You can drag the Custom Column Colors to the Field in Slicer to filter the data:
I've attached the pbix file for this example below, hope it helps!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
An option is to transform that table to the following:
You will be duplicating the rows, because a user may have 2 colours. But now the colours are in the same column, then you can filter normally.
Out-of-the-box slicer in PBI is not able to combine 2 columns. Check if there are custom visual slicer in the marketplace that can do that.
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 |
---|---|
48 | |
31 | |
27 | |
27 | |
26 |
User | Count |
---|---|
61 | |
56 | |
35 | |
31 | |
28 |