Forum Discussion

Jerz's avatar
Jerz
Regular Visitor
1 year ago
Solved

Greetings

Salutations Power BI Community,   I am currently doing Radacads->"Create a Date Dimension in Power BI in 4 Steps – Step 2: Fiscal Columns"   https://radacad.com/create-a-date-dimension-in-power-b...
  • Anonymous's avatar
    Anonymous
    1 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