Forum Discussion
Pivot or Unpivot table to separate columns
- 7 years ago
PowerBI has a button that could help you easy.
1) go to query editor.
2) select the 2 columns (number and atribute) for you
3) click on "Pivot" in the transform menu.
4) choose "number" as your value.
you can choose the default sum or do not aggegrate as an option. but the default would work to.
i hope this would work for you.
PowerBI has a button that could help you easy.
1) go to query editor.
2) select the 2 columns (number and atribute) for you
3) click on "Pivot" in the transform menu.
4) choose "number" as your value.
you can choose the default sum or do not aggegrate as an option. but the default would work to.
i hope this would work for you.
- Anonymous7 years agoNot applicable
thanks a lot for your answer.
- Anonymous7 years agoNot applicable
Hi Maddy99
One follow up question. Now that i units and revenue in their own column, i have duplicate independent categories.
For example:
I have not only "product" and "country" in my real file, there I have like 8 unique categories/segments (don't know the right word for independent item). But i would like to only have 1 unique item and then revenue and units on the same row, as shown in below picture.
Can that be done?- Maddy997 years ago
Resolver II
is the caused by the pivot action?
can you set in the advanced editor the aggegration value to sum? this may help.
i was not able to recreate this problem . so i am not sure it this would work. because you have the 0 vales in your table
or you can do a goup.
group all the other columns execpt revenue en unit.
1) select all the other columns
2) click on group by
3) make to aggegrations with a sum. 1 for revenue and 1 for unit.
- Anonymous7 years agoNot applicable
Sorry, that was a mistake.
I dont have the value 0 , it is just empty field, like this: