Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Displaced_2000
Frequent Visitor

dynamic fiscal year

I'm looking to create two columns in my table - Fiscal year start and Fiscal year End

Fiscal year start is always the first Monday in April and the end is the Sunday before the Next first monday in April

 

I create the below based on what I had seen on this post LINK 

FiscalEndDate = CEILING(EOMONTH(DATE(year([Date])+1,(04),(01)),-1)-1,7)+1

 This works very well apart from JAN FEB and MARCH.  

This is what im cuurently getting in my table and you can see from April the new column dax is working but before April it incorrect.

 

I feel like I need an IF statement potentially to check what date and if its before or after the FiscalEndDate

 

Displaced_2000_3-1674497182679.png

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Displaced_2000 , Check the last  two column of this DAX table

 

 

Date = ADDCOLUMNS(CALENDAR(date(2018,01,01), date(2020,10,31))
,"Month Year", FORMAT([Date], "MMM-YYYY")
,"Month Year sort", FORMAT([Date], "YYYYMM")
, "Year", YEAR([Date])
,"Qtr Year" ,FORMAT([Date],"YYYY\QQ"),
"WeekDay", FORMAT([Date], "ddd")
,"Month", FORMAT([Date], "MMM")
,"Month sort", FORMAT([Date], "MM")
,"Week Start Date", [date] - WEEKDAY([Date],2) +1,
"Fy1 Start Date", if(MONTH([date]) <4, date(Year([Date])-1,4,1) ,date(Year([Date]),4,1) ),
"FY Start Date ",
var _date = Date(year([Date]),4,1)
Var _monday =  _date -weekday(_date,2) +1 
var _final = if(_monday < _date, _monday+7, _monday)
var _date1 = Date(year([Date])-1,4,1)
Var _monday1 =  _date1 -weekday(_date1,2) +1 
var _final1 = if(_monday1 < _date1, _monday1+7, _monday1)
return 
if([Date] < _final, _final1, _final),

"FY End Date ",
var _date = Date(year([Date]),4,1)
Var _monday =  _date -weekday(_date,2) +1 
var _final = if(_monday < _date, _monday+7, _monday)
var _date1 = Date(year([Date])+1,4,1)
Var _monday1 =  _date1 -weekday(_date1,2) +1 
var _final1 = if(_monday1 < _date1, _monday1+7, _monday1)
return 
if([Date] >= _final, _final1, _final)-1
)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.