Forum

How to have pivoted...
 
Notifications
Clear all

How to have pivoted year and month in order

3 Posts
2 Users
0 Reactions
85 Views
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Team,

I tried to pivot in power query as per fiscal year and fiscal period. 

I got the incorrect order for FY and FP as attached.

I also included expected result. I do not mind if the result heading are in month Year or FYFP as long as they are in order for 2 fiscal years.

Thank you.

Regards,

Aye

 
Posted : 28/10/2020 8:56 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Aye,

You have to take headers separately, remove first 3 columns, then split and sort the numbers as you wish. After you finish sorting, using Table.Select is enough to sort the headers. Just join the first 3 column headers with the sorted headers.

Table.Select is usually for keeping the columns you need (removing all other columns), but the best part of it is that the list of columns you pass to this function decides also their order. Basically, we are not removing any columns, we just speculate the sort functionality.

 
Posted : 28/10/2020 10:15 pm
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Many thanks, Catalin.

As always much appreciated.

Regards,

Aye

 
Posted : 29/10/2020 12:39 am
Share: