Pergunta

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.

Foi útil?

Solução

Ok, I resolved it.

It is not about using date tables in the formulas, it should be used in the pivot tables as well, as slicers and fields.

Here the details http://www.powerpivotpro.com/2013/01/calendar-tables-not-just-for-formulas-use-them-on-your-pivots-too/

Now is working beautifully.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top