Forum Discussion
Single slicer for multiple column multiple categories
Main Table:
| Customer Type | Customer 1 Name | Customer 1 BU | Customer 2 Name | Customer 2 BU | Customer 1 Owning User | Customer 2 Owning User | Customer 1 Created By | Customer 2 Created By |
| Contact | Customer A | BU_1 | Customer A_1 | BU_2 | rocky | james | june | cindy |
| Contact | Customer B | BU_2 | Customer B_2 | BU_3 | james | chris | may | june |
| Contact | Customer C | BU_3 | Customer C_3 | BU_3 | chris | rocky | cindy | may |
I have to have one slicer for
A) "Customer 1 BU" & "Customer 2 BU" with values as
| Customer BU |
| BU_1 |
| BU_2 |
| BU_3 |
B) "Customer 1 Owning User" & "Customer 2 Owning User" with values as
| Customer Owning User |
| rocky |
| james |
| chris |
C) "Customer 1 Created By" & "Customer 2 Created By" with values as
| Customer Created By |
| june |
| may |
| cindy |
Expected Output:
If I select, "BU_1" from the single slicer "Customer BU", the table should return row number 1 only.
If I select, "June" from the single slicer "Customer Owning User", the table should return row number 1 & 2.
I did try to use the solution provided in
https://community.powerbi.com/t5/Desktop/Once-Slicer-for-multiple-columns/td-p/407949
but it works for one slicer only. I need it for multiple slicers as explained above. Also, the solution says that you need to add the measure to the visual but I don't want that to be added.
Please help PowerBI community Members
- Anonymous5 years ago
I figured it out. Tweaked the logic mentioned in the https://www.sqlbi.com/articles/creating-a-slicer-that-filters-multiple-columns-in-power-bi/
7 Replies
- lbendlin
Super User
Have you considered unpivoting your table (by adding the customer id as a column)?
- AnonymousNot applicable
This is the report view that I have shown above. I have a column named 'external_id' that can individually identify customer 1 & 2 if that's what you are referring to. lbendlin
- lbendlin
Super User
This is how your main table should look like
- AnonymousNot applicable
I appreciate your time on this.
The way I have shown the main table, that's the ideal behavior of this report. It is to find duplicate customers based on certain conditions.
So customer A & customer A_1 are like victim & survivor respectively. So if I bring them all customers in one column, that would defeat the purpose of this report.
- lbendlin
Super User
You can still achieve these results with the properly normalized main table. The matrix visual is your friend. Or some minor DAX code.
- AnonymousNot applicable
You are probably right.
But I'm afraid, the matrix visual won't work for me in this scenario. Maybe you could help with the DAX code. As mentioned in the query, the solution provided in the following link works perfectly for a single category.https://community.powerbi.com/t5/Desktop/Once-Slicer-for-multiple-columns/td-p/407949
Maybe a little help with the DAX to add another category to it (Customer BU & Customer Owning User).
Do you catch my drift? - AnonymousNot applicable
I figured it out. Tweaked the logic mentioned in the https://www.sqlbi.com/articles/creating-a-slicer-that-filters-multiple-columns-in-power-bi/