Forum Discussion
Greetings
- Anonymous1 year ago
Hi Jerz,
Thank you for reaching out to the Microsoft Fabric Forum Community.
A special thanks to lbendlin for the quick and helpful response.
That “+6 / -6” part it’s just specific to when the fiscal year starts in July (month 7). In that case.
Months before July (e.g., June = 6) are adjusted using 6 + 6 = 12
Months from July onward (e.g., July = 7) are adjusted using 7 - 6 = 1
The 6 comes from StartOfFiscalYear - 1. so this isn’t a fixed number. If your fiscal year starts in April, for example, you’d use StartOfFiscalYear = 4, and the adjustment would be different.
The general and more accurate formula provided later in the article handles this properly.
if [Month] >= StartOfFiscalYear then
[Month] - (StartOfFiscalYear - 1)
else
[Month] + (12 - StartOfFiscalYear + 1)This dynamically calculates the fiscal month no matter which month your fiscal year begins.
If you found this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to help others in the community.
Thank you & regards,
Prasanna Kumar
Which month does your fiscal year start?
From the source ->
"As an example; June 2017 is Fiscal period 12 of the fiscal year 2017. July 2017 is fiscal period 1 of the fiscal year 2018. As you can see the logic above; if calendar month is before fiscal year start month, then we add 6 to the calendar month to get the fiscal year, otherwise; we’ll reduce 6 from it."