Forum Discussion
Create a custom column from multiple columns with duplicate values to use as a slicer
Hi All,
Hoping someoine could teach me or point me in the right direction please.
I have 5 columns, 1 has a Job # and the remaining 4 represents a role and contains a name.
Example
| Job# | Role 1 | Role 2 | Role 3 | Role 4 |
| A123-1 | John Smith | Kelly Brown | David Andrew | Tim Shaw |
| B123-2 | John Smith | David Andrew | ||
| C123-3 | Tim Shaw | Tim Shaw |
As you can see, the same individual may have their name in multiple 'Roles' for a single job (C123-3) or may play the part of Role 1 in one Job, then play the part of Role 2 on another job (John Smith).
What I want to do is, create a custom column which consists of every possible name acrosss the 4 columns. I want to use this as a slicer to filter a table.
The table does not need to contain the name of whom I am filtering, just show me the list of Job# associated with that name.
Admittedly I am learning the ropes in Power BI on my own, so I am no expert at this point. I have been searching but cannot find what I need to achieve this. I have tried creating a Paramater and using that as a slicer but that only allows to filter by the Role column, not the names of the individual.
Greatly appreaciate any guidance to help me solve this.
Jays_D , one what is unpivot the 4 columns and get them into rows
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
Another one concat 4 columns and create unpivoted dimension
Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2
2 Replies
- amitchandak
Super User
Jays_D , one what is unpivot the 4 columns and get them into rows
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
Another one concat 4 columns and create unpivoted dimension
Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2- Jays_D
Advocate II
Thank you amitchandak and apologies for the late repsonse, I had taken some leave.
Unpivoting is new to me but this has solved my issue, thank you for this it's greatly appreciated!