Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I am trying to create a custom column based on calendar date to calculate fiscal quarter but getting EOF error. Kindly help.
FiscalQuarter
=VAR FiscalYearStartMonth = 9 //this line giving error
VAR CurrentMonth = MONTH('YourTable'[CalendarDate])
VAR FiscalYearAdjustment =
IF(
CurrentMonth >= FiscalYearStartMonth,
YEAR('YourTable'[CalendarDate]),
YEAR('YourTable'[CalendarDate]) - 1
)
VAR FiscalMonthAdjusted =
IF(
CurrentMonth < FiscalYearStartMonth,
CurrentMonth + 12,
CurrentMonth
)
VAR Quarter = INT((FiscalMonthAdjusted - FiscalYearStartMonth) / 3) + 1
RETURN
"Q" & Quarter & " " & FiscalYearAdjustment
Solved! Go to Solution.
I was trying to add custom column from power query editor and was getting error.
Then I discarded creating custom column from there and went into report view.
In report view , I went to desired table and added new column. That helped me get rid of error and calculate the quarter successfully.
I was trying to add custom column from power query editor and was getting error.
Then I discarded creating custom column from there and went into report view.
In report view , I went to desired table and added new column. That helped me get rid of error and calculate the quarter successfully.
Hi @Sania-F
Please download the pbix file and go to Power Query and check how I calculate FiscalQuarter
Assuming Fiscal Year start from April and end is March (please change the custom column logic as per your requirement)
So April, May, June - Quarter 1
July, Aug, Sep - Quarter 2
so
https://drive.google.com/file/d/1z4gz5hDIh9QZdfxQXXt-q88Sa9bmXW3l/view?usp=sharing
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS
Thanks
Pijush
Proud to be a Super User! | |
Hi @Sania-F
If it is solved, please mark it as a solution and close it.
Proud to be a Super User! | |