This proposal employs Get & Transform (Power Query) found on the Data tab.
1. Convert the range of raw data into an Excel table (columns A:B)
2. Use the following Power Query code to produce the green/white table (columns D:E):
let
Source = Excel.CurrentWorkbook(){[Name="tbl_Genre"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Movie title", type text}, {"Genre 1", type text}, {"Genre 2", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Movie title"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Value", "Genre"}})
in
#"Renamed Columns"
3. Produce the pivot table from the green/white table
Note for future reference, please upload an .xlsx file so that contributors do not have to recreate your data.
Let us know if you have any questions.
Bookmarks