Not sure I am answering correctly, but please check attached file.
Create month header.
// Adjust fiscal year
Change sort order manually to put January to the end.
Thanks. Got the logic from the attached workbook.
Is there a way we can do away with the sorting of the months, and still show the months in the correct order? I will be connecting to a MS Sql Sever database where the data is updated frequently.
Also, please suggest any ideas you might have if we were looking for a shorter period of time, say 6 months, or 3 months.
2 of 2 people found this helpful
Is there a way we can do away with the sorting of the months, and still show the months in the correct order?
Change the sort order to datasource order.
we were looking for a shorter period of time, say 6 months, or 3 months.
Simply filter with [Header Month] ?
Thanks for the guidance here, and sorry for the delay in coming back.
Not sure, whether it is a bug in Tableau, or I am doing it wrong- When I use the relative filter for last n months and the months go back to previous calendar year, Tableau does not show the months in the correct order when I am using the Months in an axis.
I am showing last 12 months sales data, for this year and for last year. When I plot it, the months appear in the Jan to Dec order, I had to manually sort the months, so that the months appear in Mar to Feb order. (This is live data. I have told my team this is fixed. But when March data for this year comes into picture, I might need to do the sorting again to show the March in right place)
I tried with Data Source Order for sorting, but it does not work.
Below is the view, where I have manually moved the Jan and Feb months to appear at the last.
Appreciate your guidance here
I was wondering if you could explain the logic behind the Header Year calculation:
Since this is referring to the YEAR, why do we use "month" for the DATEADD function for the previous month (-1)?
Or am I reading this calculation wrong?
Because your fiscal year starts February.
// Adjust fiscal year
When it's Jan judgement point date is December (Month -1)
When it's Feb judgement point date is Jan
When it's Dec judgement point date is Nov
So the year change from Feb.
BTW, could you mark my answer as correct.