Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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