Forum Discussion
TotalYTD not working
- 4 years ago
VGoncalves , try like
HIRINGS_L1Y =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1*MONTH(_max))+1
return
CALCULATE(Sumx(Values(DIM_DATES[Month Year]),
CALCULATE(SUM(BD_COLAB[HIRING]), DATESINPERIOD(DIM_DATES[Date], MAX(DIM_DATES[Date]), -13, MONTH))),DATESBETWEEN('Date'[Date],_min,_max))
VGoncalves , try like
HIRINGS_L1Y =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1*MONTH(_max))+1
return
CALCULATE(Sumx(Values(DIM_DATES[Month Year]),
CALCULATE(SUM(BD_COLAB[HIRING]), DATESINPERIOD(DIM_DATES[Date], MAX(DIM_DATES[Date]), -13, MONTH))),DATESBETWEEN('Date'[Date],_min,_max))
@amitchandak i run again the measure, and still doesnt work, but the numbers arent that off. For jan'22 i have 378 hirings and for feb'22 i have 399 hirings, should give me a YTD of 777 hirings, but using your measure will give me 798 hirings.. its not that off, but isnt right