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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Reorder table by rows from a month column

Dear community, I am starting working on PowerBI and I am creating a solution to register our monthly KPIs, so the users enter their values by month so in order to create a progress dashboard by month I would like to reorder my table like this:

 

AxelEsquivel_1-1709913493875.png

Is it posiible to do?

Thank you!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

For your question, here is the method I provided:

 

Here's some dummy data

vnuocmsft_0-1710134756619.png

 

Load data into PowerBI.

 

Use Power Query to convert the data.

vnuocmsft_1-1710134804427.png

 

Click on the "Mes" column and in the Transform tab click on "Pivot Column".

vnuocmsft_2-1710134966684.png

 

Select "Valor sum".

vnuocmsft_0-1710135066016.png

 

Finally, select "Close & Apply".

vnuocmsft_1-1710135144398.png

 

Here is the result.

vnuocmsft_3-1710135252238.png

 

Regards,

Nono Chen

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

For your question, here is the method I provided:

 

Here's some dummy data

vnuocmsft_0-1710134756619.png

 

Load data into PowerBI.

 

Use Power Query to convert the data.

vnuocmsft_1-1710134804427.png

 

Click on the "Mes" column and in the Transform tab click on "Pivot Column".

vnuocmsft_2-1710134966684.png

 

Select "Valor sum".

vnuocmsft_0-1710135066016.png

 

Finally, select "Close & Apply".

vnuocmsft_1-1710135144398.png

 

Here is the result.

vnuocmsft_3-1710135252238.png

 

Regards,

Nono Chen

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

 

 

 

_AAndrade
Super User
Super User

Hi,
Try this M code

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnXyDFHSUXLLzEvMS85MzAGyvRLzShOLKoEsAz1DCyOlWB2sytxSk4oQ6szMwOp8UtPBkjAa2SwLS7ASzxCFgKL8rNTkEqAo2FQkRThUoNhlZGxhohQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Title = _t, Area = _t, Month = _t, Value = _t]),
    RemoveColumns= Table.SelectColumns(Source,{"Title"}),
    RemoveDuplicates = Table.Distinct(RemoveColumns),
    AddIndex = Table.AddIndexColumn(RemoveDuplicates, "IndexTitle", 1, 1, Int64.Type),
    Merged = Table.Join(Source,"Title",AddIndex,"Title"),
    NewStep=Source,
     RemoveColumns2 = Table.SelectColumns(NewStep,{"Month"}),
    RemoveDuplicates2 = Table.Distinct( RemoveColumns2),
    AddIndex2 = Table.AddIndexColumn(RemoveDuplicates2, "IndexMonth", 1, 1, Int64.Type),
    Merged2 = Table.Join(Merged,"Month",AddIndex2,"Month")
in
    Merged2

And after Order Month by IndexMonth and Title by Index Title using this option:

_AAndrade_0-1709918450086.png


The final result should be this:

_AAndrade_1-1709918478271.png

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




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