In the IMDB database, each person in the namebasics.tsv file may have none or more professions. There are 41 different professions.
We need to “normalize” the professions by creating a new table and putting all of the professions in that table. Our new table will have a column of the primary keys of each person, called nconst. The next column will have the profession name, such as actor or director. If a person has exactly two professions, they will have two rows in this table.
let Source = namebasics, #"Removed Columns" = Table.RemoveColumns(Source,{"primaryName", "birthYear", "deathYear", "knownForTitles.1", "knownForTitles.2", "knownForTitles.3", "knownForTitles.4"}), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"nconst"}, "Attribute", "Value"), #"Removed Columns1" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}), #"Renamed Columns" = Table.RenameColumns(#"Removed Columns1",{{"Value", "Profession"}}) in #"Renamed Columns"