Forum Discussion
Dynamic Fiscal Year Calculation
- Anonymous2 years ago
Hi, brankocareer
You can try the following methods.
Measure = CALCULATE(SUM('OS + PNG'[BONUSES]),ALLEXCEPT('Date','Date'[Fiscal Year]))Measure 2 = Var _FY=CALCULATE(MAX('Date'[Fiscal Year]),FILTER(ALL('Date'),[Date]=MAX('Date'[Date]))) Return CALCULATE([Measure],FILTER(ALL('Date'),[Fiscal Year]=_FY))Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, brankocareer
You can try the following methods. Create a date table.
Measure = CALCULATE(SUM('Table'[Bonus]),FILTER(ALL('Table'),[Date]<=MAX('Date'[Date])),FILTER(ALL('Date'),[Fiscal Year]=YEAR(MAX('Date'[Date]))))
Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- brankocareer2 years agoHelper I
Hi Charlotte,
Your method works at year level. If you add month, it won't work.
- brankocareer2 years agoHelper I
Hi Anonymous ,
Thank you for your reply! Your method works at year level. However, if you add month, it won't work. How to address this issue?
Thank you!
Branko
- brankocareer2 years agoHelper I
Hi Anonymous
I really need your help, I still can not get what I want, even I revised my measure. I already add a [Fiscal Year ] column in 'Date' table. What I need is only one year (2022 in this case) and months show up, other than all years.
This_FY Bonus =VAR _MaxSelectedDate = MAX('Date'[Date])VAR _FiscalYear = IF(MONTH(_MaxSelectedDate) < 4, YEAR(_MaxSelectedDate) - 1, YEAR(_MaxSelectedDate))RETURNCALCULATE(SUM('OS + PNG'[BONUSES]),FILTER(ALL('Date'),'Date'[FiscalYear] = _FiscalYear &&'Date'[Date] >= DATE(_FiscalYear, 4, 1) &&'Date'[Date] <= _MaxSelectedDate))Could you please help me out?
Thank you!
Branko