Forum Discussion
sales summary
Hi everyone,
My imported querry looks like that:
project name sales in 2017 sales in 2018 sales in 2019
project A 1 3 6
project B 10 4 8
project C 15 5 4
project D 12 6 5
project XYZ...
I would like to create a querry, where I would get the data sorted in a way presented below:
YEAR Sales amount
2017 38
2018 18
2019 23
20XX ...
Could anyone please help me?
Hi Kisi3ll,
In your scenario, you can open the Query Editor, rename the column "sales in 2017", "sales in 2018", "sales in 2019" to "2017","2018","2019". Then select the columns "2017","2018" and "2019" and click Unpivot Columns. Use Group By to return summarized table. For more information, you can download attached pbix file to have a look.
Best Regards,
Qiuyun Yu
1 Reply
- v-qiuyu-msft
Community Support
Hi Kisi3ll,
In your scenario, you can open the Query Editor, rename the column "sales in 2017", "sales in 2018", "sales in 2019" to "2017","2018","2019". Then select the columns "2017","2018" and "2019" and click Unpivot Columns. Use Group By to return summarized table. For more information, you can download attached pbix file to have a look.
Best Regards,
Qiuyun Yu