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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher 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.

dufoq3
Community Champion
Community Champion

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.