Forum Discussion
Seeling Analysis MIX
- 6 years ago
Ficou assim:
Mix Empresa % PY =
VAR totalvendido = [Vendas Todos Clientes e Produtos Ultimos 60 dias PY]
VAR vendalinha60dias = [Vendas Todos Clientes Ultimos 60 dias PY]
RETURN
DIVIDE( vendalinha60dias, totalvendido, 1 )
Vendas Todos Clientes Ultimos 60 dias PY =
CALCULATE(
[Vendas],
ALL(CLIENTES),
DATESINPERIOD(
CALENDARIOCOMERCIAL[DATA],
LASTDATE(
DATEADD(
CALENDARIOCOMERCIAL[DATA],
-1,
YEAR
)
),
-2,
MONTH
)
)
Vendas Todos Clientes e Produtos Ultimos 60 dias PY =
CALCULATE(
[Vendas],
ALL(CLIENTES),
ALL(PRODUTOS),
DATESINPERIOD(
CALENDARIOCOMERCIAL[DATA],
LASTDATE(
DATEADD(
CALENDARIOCOMERCIAL[DATA],
-1,
YEAR
)
),
-2,
MONTH
)
)
Ok, this part I had tried but after get back one year I need to calculate DatesInPeriod of of 2 months before thats the problem
Hi bonafides ,
To get 2 months use this measure
YR Vendas Todos Clientes e Produtos Ultimos 60 dias =
CALCULATE (
[Vendas],
ALL ( CLIENTES ),
ALL ( PRODUTOS ),
DATEADD (
CALENDARIOCOMERCIAL[DATA],
-2,
MONTH
)
)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!