Purpose: After loading data into Power BI, we may need to do data manipulation to ensure the data can be pointed, plotted, and presented appropriately to the audiences.
Data: [Simulation].[005_Demand_By_Product_Month]
Steps:
1. [Data] -> [Edit Queries]
2. Go to [Transform]
- Group By: Create a aggregate view grouped by defined items.Using [Advanced] allows us to select more group-by items and aggregated fields.
- First row as headers or headers as first row
- Transpose
- Pivot data: select target column (here we select [Month]) and value filled in the cells (here we select sum [units]).
- Unpivot data: Select target columns to be new attribute (Here we directly select 12 months from the result of pivot data).
Data: [Simulation].[005_Demand_By_Product_Month]
Steps:
1. [Data] -> [Edit Queries]
2. Go to [Transform]
- Group By: Create a aggregate view grouped by defined items.Using [Advanced] allows us to select more group-by items and aggregated fields.
- First row as headers or headers as first row
- Transpose
- Pivot data: select target column (here we select [Month]) and value filled in the cells (here we select sum [units]).
- Unpivot data: Select target columns to be new attribute (Here we directly select 12 months from the result of pivot data).
We can track the change we made in the [Applied Steps] and make update (reorder, remove, edit, etc).
Thanks! Enjoy it :)
Comments
Post a Comment