Forum Discussion
yaman123
5 years agoPost Partisan
YTD Volume
Hi, I am having an issue calculating the YTD volume from a dataset. I have a supply end date date slicer which is a between e.g user selects 01/02/2021 - 28/02/2021 I need to calculate ...
amitchandak
5 years agoSuper User
yaman123 , Try like
Rolling 11 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-11,MONTH))
or
measure =
var _max = maxx(allselected('Date1'), 'Date1'[Date])
var _min = eomonth(minx(all('Date'), 'Date'[Date]),-11)
return
calculate(sum(Sales[Sales Amount]), filter(all('Date'),'Date'[Date] <= _max && 'Date'[Date] >=_min))
yaman123
5 years agoPost Partisan
Hi,
That also doesnt work. My slicer is is a between selection, so two dates are selected. I am not getting the correct figures from the code you have provided.