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
This is what I have for Month:
FYMonthNum =
VAR FYStartMonth = 7
//Update the fiscal year starting month above *Use number between 1 to 12
RETURN
IF (
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 )
)
)
jennratten
4 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 )