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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RichieDazza
New Member

Stumped: when you need to Pivot before visualising

I have a very large dataset consisting of itemised sales by date, with columns for category, subcategory, channel of sale e.g. online/offline, price. 

 

I would ONLY like to create visuals based on aggregated data, such as count of sales by category, count of sales by channel. This is not just 1 isolated count/pivot table, but a series of around 10 pivots/transformations that I want to do before making any visuals. Also, I don't want to display the pivoted data in my report using Matrix, rather I want to create a graph visual from the aggregated data.

 

I would also like to do multi-variable pivots e.g. with channel of sale (online/offline) in the columns, and product subcategory in the rows and count of sales as the values 

 

FYI: I know how I can run the pivots in excel and import into PowerBi. But this just makes me favour using excel for the whole process. Is there a way I can do the pivots efficiently in Powerquery so I don't have to leave PowerBI? I.e. 1. import raw data,2. Pivot like crazy, 3. create graph visuals from this aggregated data?

 

Many thanks,

Richie

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi  @RichieDazza ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @RichieDazza ,

Please check if the funciton PIVOT can help you achieve your requirement in Power Query Editor...

Pivot columns

yingyinr_1-1660788701086.png

Pivot and Unpivot with Power BI

yingyinr_2-1660788770206.png

 

If the above ones can't help you, please provie some raw data (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.