Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago

incidence SAMEPERIODLASTYEAR

Good morning.

I am having certain incidents with SAMEPERIODLASTYEAR in which I would like to add amount from a year ago.

I currently have this variable:

D-H LY = CALCULATE(SUM(VIS_ALQ_PBI_Partides[Matter]), SAMEPERIODLASTYEAR(TablaFechas[FechaAsiento].[Date]))
But instead of returning the value of the "Prova" column, it always repeats the same value to me

On the other hand, the content of the prova variable is correct, forcing the sum of the year 2021... but I would like with the function SAMEPERIODLASTYEAR

test = CALCULATE(SUM(VIS_ALQ_PBI_Partides[Matter]),VIS_ALQ_PBI_Partides[Exercise]=2021)
At the level of relationships, I would say that it is correct:

I would appreciate your help in making me see what I am doing wrong.
Thank you.

2 Replies