Forum Discussion
Transpose & Pivot using Power Query
- Anonymous1 year ago
Hi arimoldi
Excel
I retested your problem by first importing the excel table into the power bi desktop and going to the power query interface to get the following table:
1. If you don't want empty values to display data, consider replacing "null" with Spaces.
In the same step, you just need to change the "0" to " ".
Use the first line as the title.
Delete "Changed Type1" from the step bar on the right.
2. Select the first column and click Fill -> Down. The first column will be filled in automatically.
Finally, the column with the date header is also selected for unpivot.
Change the column name as required.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
thanks for the replay.
For point #1 ok, I was wondering if there was another way to manage null instead of replacing them with 0, but anyway it is fine.
For point #2 your solution seems to be applicable only in the case I have a domain table where alla ACTIVITY and MACRO_ACTIVITY are listed, but this is not the case... I have just one table and the MACRO_ACTIVITY are merged cells so when I import the dataset not all the ACTIVITY are associated to the related MACRO_ACTIVITY.
Thanks,
Andrea
Hi arimoldi
Excel
I retested your problem by first importing the excel table into the power bi desktop and going to the power query interface to get the following table:
1. If you don't want empty values to display data, consider replacing "null" with Spaces.
In the same step, you just need to change the "0" to " ".
Use the first line as the title.
Delete "Changed Type1" from the step bar on the right.
2. Select the first column and click Fill -> Down. The first column will be filled in automatically.
Finally, the column with the date header is also selected for unpivot.
Change the column name as required.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.