cancel
Showing results for
Did you mean: Helper II

## Year to Date last year

Hi I am using the working formula below to calculate our YTD turnover.

YTD_2020 = CALCULATE(SUM('FACTVERKOOP_ALL'[BRUTO_OMZET]);YEAR('FACTVERKOOP_ALL'[DATE])=YEAR(TODAY()))

What formula can I use to get the result for the year before?

1 ACCEPTED SOLUTION Super User IV

@BartVlek , With a date table

LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return

or

LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return

Proud to be a Super User!

2 REPLIES 2 Super User IV

@BartVlek , With a date table

LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return

or

LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return

Proud to be a Super User! Solution Specialist

var maxyear = YEAR(TODAY())

YTD_2020 = CALCULATE(SUM('FACTVERKOOP_ALL'[BRUTO_OMZET]);YEAR('FACTVERKOOP_ALL'[DATE])=maxyear)

and you can use the same substratct one to geet last year

var maxyear = YEAR(TODAY())

LYTD_2019 = CALCULATE(SUM('FACTVERKOOP_ALL'[BRUTO_OMZET]);YEAR('FACTVERKOOP_ALL'[DATE])=maxyear-1)

And to confirm are you looking for Full year else the same dates available in latest year with the last year?

If you think this is helpful please Accept this as Solution and leave a like.

Regards,

Manikumar  