I am working with a PowerPivot model where I want to add date intelligence formulas using DAX. I could build the formula and after checking it, Power Pivot says that are ok, nevertheless, the formulas are returning values that are not consistency with what I am expecting.
YTD Formula:
=CALCULATE(TOTALYTD(SUM(V_CONTABILIDAD_EstadosFinancieros[Saldo]),V_CONTABILIDAD_EstadosFinancieros[FinPeriodo]))
The error is that the value that is returning is the same value as Saldo, it means is not accumulating the amount over months.
Last Year Formula
=CALCULATE(SUM(V_CONTABILIDAD_EstadosFinancieros[Saldo]),DATEADD(V_CONTABILIDAD_EstadosFinancieros[InicioPeriodo],-1,YEAR))
The error is that is not giving me any value. The fields InicioPeriodo and FinPeriodo as marked as dates.
Please your advice if I need to check something additional in the model in order that these functions work.
Thanks in advance.