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
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
I really appreciate this analysis of this component. This is a steep learning curve. The "Fiscal Month" still is confusing, It is mainly the whole "+6 / -6” and "if [Month] >= StartOfFiscalYear then
[Month] - (StartOfFiscalYear - 1)
else
[Month] + (12 - StartOfFiscalYear + 1)" but I will look over this explanation again.
Thank you again for taking the time.
-Jerzee