Forum Discussion
Custom Fiscal Year with DAX
- 2 years ago
chonchar if it is of type date then try to change it to this to see if it works:
Year = VAR __Date = 'Table'[Date] VAR __Year = YEAR ( __Date ) VAR __StartDate = DATE ( __Year, 10, 1 ) VAR __EndDate = DATE ( __Year + 1, 9, 30 ) RETURN IF ( __Date >= __StartDate && __Date <= __EndDate, __Year + 1, __Year )
chonchar , I created few scripts in past for FY year, please check if those can help
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441
https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5ee47de6a208
https://amitchandak.medium.com/cheat-sheet-power-query-financial-year-calendar-5ceaacb520f1
DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s
Power BI Date Table: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=18180s
Thanks for the reply. I was hoping for somehting a little simpler to implement.
Something like:
If (screened date) ISBETWEEN 10/1/2016-9/30/2017, Return "Contract Year 2017", Else
Contract Year 2018
etc.