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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
adamh1
Frequent Visitor

Fiscal year period sorting

Hi Guys  , We have a fiscal year Jul to Jun,  - in the format tab I'm not able to sort graphs of tables by the sequence of months form Jul to Jun

In trying to fix/resolve this  in the data tab I've tried 3 differnt columns for the financial year period numbers i.e.

i. FinMonthSort = if(Month(DateKey[date])>6,Month(DateKey[date])-6,Month(DateKey[Date])+6)

ii.FMonthNo = SWITCH(DateKey[MonthNo],    1,"7",    2, "8",    3, "9",    4, "10",    5, "11",    6, "12",    7, "1",    8, "2",    9, "3",    10, "4",    11, "5",    12, "6",  ( deriving financial month form calander month using switch)
    BLANK ())

iii.FinDate = DATEADD(DateKey[Date],+6,MONTH) and derived the Financial year period number from the FinDate

 

- when sorting each financial month column in the data tab the sequence of the table contents doesn't change when clicking on the sort icon

- the table only sorts when sorting the column directly i.e. select the column and right click and select "Sort in asending order"... (don't know if this a the problem??) 

When I go to the format tab the changes from sorting don't flow thru - the month short name "MMM" continues to be sorted alphabetically 

any ideas or further information I could provide to help solve please let me know.

 

many thanks Adam

2 REPLIES 2
Anonymous
Not applicable

Here's my solution:

 

1. Duplicate Date Column

2. Split Column by Delimiter (however your date is formated, I split by each occurrence of /)

3. Delete the column with the days, since the months are the only thing that I'm concerned about 

4. Exit Query Editor 

5. Right click on the table that you are interested in, choose 'New Column')

6. Essentially you create a measure that says if the month is between x and y then produce the year, if not, produce year-1. Here's mine for fiscal year July x+1 through June x: 

 

Fiscal Year = IF('Transactions FY11 to FY18'[Date Month]<7,'Transactions FY11 to FY18'[Date Year], 'Transactions FY11 to FY18'[Date Year]-1)

mussol_
Advocate II
Advocate II

Hi Adamh1,

try to add a column in wich 6=1, 7=2, etc.

Later, sort your FY month by this column.

 

Hope it will be useful.

 

Regards.

 

Josep.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.