Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kisi3ll
Frequent Visitor

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?

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
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. 

 

q3.PNGq4.PNGq5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
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. 

 

q3.PNGq4.PNGq5.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.