Forum Discussion
Power BI Pivot Columns ?
- 5 months ago
From your screenshot, your query already ends with:
in #"Renamed Columns2"Then you pasted another let ... in ... block underneath. Power Query can only have one let … in … per query. So you must either:
-
Replace the entire query with the new code, or
Create a New Query and paste the code there.
Seems like your problem lies in here.
So instead of mixing the code in a wrong way try using the UI of power query. Also could help if you share your .pbix or full code.
- In Power Query Editor, select the column that should become the new column headers.
- Go to Transform → Pivot Column.
- Choose the column that contains the values.
- Select an aggregation (usually Sum, Max, or Don't Aggregate if each key is unique).
-
From your screenshot, your query already ends with:
in
#"Renamed Columns2"
Then you pasted another let ... in ... block underneath. Power Query can only have one let … in … per query. So you must either:
-
Replace the entire query with the new code, or
Create a New Query and paste the code there.
Seems like your problem lies in here.
So instead of mixing the code in a wrong way try using the UI of power query. Also could help if you share your .pbix or full code.
- In Power Query Editor, select the column that should become the new column headers.
- Go to Transform → Pivot Column.
- Choose the column that contains the values.
- Select an aggregation (usually Sum, Max, or Don't Aggregate if each key is unique).