Forum Discussion
Week continuity between years
- 6 years ago
Hi ImPalaBI ,
I created a calculated column like this:Column = VAR x = COUNT(Sheet3[Semana]) + 1 RETURN CALCULATE( SUM(Sheet3[Stock]), FILTER( Sheet3, Sheet3[Semana] = 5-EARLIER(Sheet3[Semana]) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you share the current formula
The main formula is:
Stock LW =
VAR SemanaActual = SELECTEDVALUE(agile[Semana.M])
RETURN
SUMX(
FILTER(ALLEXCEPT(agile;agile[Categoría];agile[Marca];agile[Modelo]);
agile[Semana.M] = SemanaActual -1 );
[SUM Stock])
That gives me the stock, of the current week - 1 (SemanaActual meand CurrentWeek in Spanish)
Semana.M is a value filed manually.
From there, I get the current week value with this formula:
SUM Stock = SUM(agile[Stock])
And then, I divide them to get the difference:
Stock Dif % Sem a Sem =
DIVIDE(
[SUM Stock]-[Stock LW];
[Stock LW];
"0")
- v-lionel-msft6 years ago
Community Support
Hi ImPalaBI ,
I created a calculated column like this:Column = VAR x = COUNT(Sheet3[Semana]) + 1 RETURN CALCULATE( SUM(Sheet3[Stock]), FILTER( Sheet3, Sheet3[Semana] = 5-EARLIER(Sheet3[Semana]) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.