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
rvivek
New Member

Create a forecast in line chart with fiscal quarter and fiscal year

Hello, I need help in creating a power bi line chart forecasting with the fiscal quarter and fiscal year. My Q1 is from Oct-Dec and so on. I have dates in a column and Fiscal Quarter & Fiscal Year in other columns. I am not sure how to implement the fiscal quarter into the line chart forecasting.

1 ACCEPTED SOLUTION
pankajnamekar25
Super User
Super User

Hello @rvivek 

 

Here is your DAX code to create a fiscial calendar table

DateTable =

ADDCOLUMNS(

    CALENDAR(DATE(2019,10,1), DATE(2026,9,30)),

    "Year", YEAR([Date]),

    "Month", FORMAT([Date], "MMMM"),

    "Month Number", MONTH([Date]),

    "Fiscal Year",

        "FY" &

        FORMAT(

            IF(MONTH([Date]) >= 10, YEAR([Date]) + 1, YEAR([Date])

        ), "00"),

    "Fiscal Quarter",

        "Q" &

        SWITCH(

            TRUE(),

            MONTH([Date]) IN {10, 11, 12}, 1,

            MONTH([Date]) IN {1, 2, 3}, 2,

            MONTH([Date]) IN {4, 5, 6}, 3,

            MONTH([Date]) IN {7, 8, 9}, 4

        ),

    "Year-Quarter",

        "FY" &

        FORMAT(

            IF(MONTH([Date]) >= 10, YEAR([Date]) + 1, YEAR([Date])

        ), "00") &

        " Q" &

        SWITCH(

            TRUE(),

            MONTH([Date]) IN {10, 11, 12}, 1,

            MONTH([Date]) IN {1, 2, 3}, 2,

            MONTH([Date]) IN {4, 5, 6}, 3,

            MONTH([Date]) IN {7, 8, 9}, 4

        )

)

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

View solution in original post

5 REPLIES 5
v-kathullac
Community Support
Community Support

Hi @rvivek ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-kathullac
Community Support
Community Support

Thanks @pankajnamekar25 , @ryan_mayu  for Addressing the issue.

 

Hi @rvivek ,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,

Chaithanya

v-kathullac
Community Support
Community Support

Thanks @pankajnamekar25 , @ryan_mayu  for Addressing the issue.

 

Hi @rvivek ,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,

Chaithanya

pankajnamekar25
Super User
Super User

Hello @rvivek 

 

Here is your DAX code to create a fiscial calendar table

DateTable =

ADDCOLUMNS(

    CALENDAR(DATE(2019,10,1), DATE(2026,9,30)),

    "Year", YEAR([Date]),

    "Month", FORMAT([Date], "MMMM"),

    "Month Number", MONTH([Date]),

    "Fiscal Year",

        "FY" &

        FORMAT(

            IF(MONTH([Date]) >= 10, YEAR([Date]) + 1, YEAR([Date])

        ), "00"),

    "Fiscal Quarter",

        "Q" &

        SWITCH(

            TRUE(),

            MONTH([Date]) IN {10, 11, 12}, 1,

            MONTH([Date]) IN {1, 2, 3}, 2,

            MONTH([Date]) IN {4, 5, 6}, 3,

            MONTH([Date]) IN {7, 8, 9}, 4

        ),

    "Year-Quarter",

        "FY" &

        FORMAT(

            IF(MONTH([Date]) >= 10, YEAR([Date]) + 1, YEAR([Date])

        ), "00") &

        " Q" &

        SWITCH(

            TRUE(),

            MONTH([Date]) IN {10, 11, 12}, 1,

            MONTH([Date]) IN {1, 2, 3}, 2,

            MONTH([Date]) IN {4, 5, 6}, 3,

            MONTH([Date]) IN {7, 8, 9}, 4

        )

)

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

ryan_mayu
Super User
Super User

@rvivek 

 

try below to create fiscal quarter and year in the date table.

 

fiscalyear = if (month('date'[Date])>=10, year('date'[Date])+1,year('date'[Date]))
 
fiscalmonth = if(QUARTER('date'[Date])=4,1,QUARTER('date'[Date])+1)
 
11.png
 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.