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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Power Query - Dataset Transformation

I have the following dataset from dataflow and some additional steps in power query. 

 

Before.png

 

 

Now that I have this, is there anyone that can guide on the best method to transform as follows:

 

After.png

8 REPLIES 8
Anonymous
Not applicable

I have managed to get this data in the right format.

Anonymous
Not applicable

Hi @Anonymous ,

I'm not quite sure what your needs are, are you trying to convert the data in that screenshot above to the format in the one below, or are you trying to convert the data in the screenshot below to the format in the one above?

Best Regards,
Dino Tao

Anonymous
Not applicable

I have the top and want to transform to the below.

Anonymous
Not applicable

Hi @Anonymous ,

Neither M code in Power Query nor DAX in Power BI Desktop enables splitting a table and adding a TOTAL row for each sub-table. My suggestion is that you put the table into a matrix visual object and set both the column Entity and the column Vendor Number to the row headers.
Or you can try using Report Builder to create a paginated report.

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It is possible with M, but this is not purpose of PowerQuery.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Hi,
This can be done inside power query by taking advantage of the m language.

Anonymous
Not applicable

Thanks - this is what I intent to do - it's the syntax of the m language that I am looking for some guidance with.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.