Forum Discussion
How to match multiple values from multiple look up values
Hello dear all,
I'm trying to find a formula which allows me to create look up between my 2 tables. Table1 contains a list of movies (single values) + for each movie the list of actors playing in it. Table2 is a list of single values of all actors contained in ListOfActors in table1.
table1 table2
My goal is to find a formula which allows me to match the values from table2 with the ListOfActors in table1. I have not been able to to achieve this with different kinds of formulas like CONTAIN, FIND, etc., since there are several actors playing in a single movie and most actors are playing in several movies.
And in a next step, in the reporting/dashboard view, I need to be able to slice/filter the list of movies with the single actor text values from table2.
I hope I explained my case in a clear matter!?
Thanks in advance to the community for any help! :) ... I've been stuck here for hours and hours....
Cheers
In Power Query, split your Actors column in your Movies table by delimiter (,). Then unpivot those columns. You will end up with:
Movie,Actor
Albert,A
Albert,B
Albert,C
Albert,D
Bernard,A
Bernard,B
Bernard,D
...
This will allow you to achieve what you want.
4 Replies
- jthomson
Solution Sage
Just split your list of actors by the comma delimiter and then do a bit of unpivoting
- Greg_Deckler
Community Champion
In Power Query, split your Actors column in your Movies table by delimiter (,). Then unpivot those columns. You will end up with:
Movie,Actor
Albert,A
Albert,B
Albert,C
Albert,D
Bernard,A
Bernard,B
Bernard,D
...
This will allow you to achieve what you want.
- JAWSFrequent Visitor
Thanks for the help, it worked out fine!
- prarik_rainaNew Member