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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors