Forum Discussion
Previous Year - December
How can i get sales for previous year December only?
I have a table with sales and date.
- Anonymous5 years ago
Hi Sdhn420 ,
You can create a measure as follows.
_sum = SUMX(FILTER(ALL('Table'),YEAR([Date])=YEAR(TODAY())-1&&MONTH([Date])=12),[Sales])My test table:
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Sdhn420 , Try like, with help from date table
last year last MTD Sales =
var _max = datediff(startofyear('Date'[Date],"12/31"), maxx(allselected('Date'), 'Date'[Date]),month)
return
CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1*_max,MONTH))) - AnonymousNot applicable
Hi Sdhn420 ,
You can create a measure as follows.
_sum = SUMX(FILTER(ALL('Table'),YEAR([Date])=YEAR(TODAY())-1&&MONTH([Date])=12),[Sales])My test table:
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.