Forum Discussion
Anonymous
4 years agoNot applicable
Date Filtering - Fiscal Year
I have the dates aligned to follow the fiscal year, but the data is still showing from last year. July starts our fiscal year, I want the data to populate as we go through the months. So in the photo...
- 4 years ago
Okay, so you would just need some slight modifications for the year. Try this please..
FYYearNum = VAR FYStartMonth = 7 VAR CurrentYear = Year ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) VAR CurrentMonth = Month ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) VAR PriorYear = CurrentYear - 1 RETURN IF ( CurrentMonth >= FYStartMonth, PriorYear, CurrentYear )
Anonymous
4 years agoNot applicable
No, it looks like this.
jennratten
4 years agoSuper User
Do you have a column in your date table for Fiscal Year? For example, July 2022 - June 2023 would be 2022. Then use the fiscal year as the filter.
- Anonymous4 years agoNot applicable
I don't know how to write this. Do you have an example?
- Anonymous4 years agoNot applicable
This is what I have for Month:
FYMonthNum =VAR FYStartMonth = 7//Update the fiscal year starting month above *Use number between 1 to 12RETURNIF (MONTH ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) >= FYStartMonth,MONTH ( TB_MDH_DATA_DAILY_MONTHLY[DT] )- ( FYStartMonth - 1 ),12+ (MONTH (TB_MDH_DATA_DAILY_MONTHLY[DT] )- ( FYStartMonth - 1 )))- jennratten4 years agoSuper User
Okay, so you would just need some slight modifications for the year. Try this please..
FYYearNum = VAR FYStartMonth = 7 VAR CurrentYear = Year ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) VAR CurrentMonth = Month ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) VAR PriorYear = CurrentYear - 1 RETURN IF ( CurrentMonth >= FYStartMonth, PriorYear, CurrentYear )