I am trying to create measures with the DATEADD function for each month of the present year. I am doing this by passing a THISMONTH mueasures into the DATEADD to calculate how many time periods to step back to get each month. All future months will be "0" as there are actuals in future months: For example:

JAN:=IF(-([THISMONTH]-1)>0,0,

CALCULATE(SUM(fact_ActualsOrders_ES[amount]),DATEADD(fact_ActualsOrders_ES[actuals_date],-([THISMONTH]-1),MONTH)))

FEB:=IF(-([THISMONTH]-2)>0,0,

CALCULATE(SUM(fact_ActualsOrders_ES[amount]),DATEADD(fact_ActualsOrders_ES[actuals_date],-([THISMONTH]-2),MONTH)))

The SUM on [amount] is returning very, very high (and incorrect) for the first (3) months I've tried.

What am I doing wrong? And advice?

Thanks!!!

JAN:=IF(-([THISMONTH]-1)>0,0,

CALCULATE(SUM(fact_ActualsOrders_ES[amount]),DATEADD(fact_ActualsOrders_ES[actuals_date],-([THISMONTH]-1),MONTH)))

FEB:=IF(-([THISMONTH]-2)>0,0,

CALCULATE(SUM(fact_ActualsOrders_ES[amount]),DATEADD(fact_ActualsOrders_ES[actuals_date],-([THISMONTH]-2),MONTH)))

The SUM on [amount] is returning very, very high (and incorrect) for the first (3) months I've tried.

What am I doing wrong? And advice?

Thanks!!!

Last edited: