Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Assuntos relacionados a criação de medidas, fórmulas e funções DAX, relacionamentos etc
Por FilipeA
#66857
Olá a todos,

Ainda estou a iniciar-me no Power Bi, mas preciso de terminar uma analise e gostava de contar com a vossa ajuda.
Preciso comparar 2021 com 2020, com 2019, 2018.
Para comparar com o ano anterior coloquei esta fórmula e funciona. Não sei fazer é para anos anteriores a 2020. :roll:
Qual a fórmula para 2019, 2018, etc?

Vendas 2020 =
VAR UltimaVenda =
CALCULATE (
LASTDATE(Tb_Vendas[Data]),
All(Tb_Vendas))
VAR DataLimite = EDATE(UltimaVenda,-12)
Return
CALCULATE(
[Vendas Valor 2020],
SAMEPERIODLASTYEAR('Base Calendario'[Date]),
FILTER(
ALL('Base Calendario'),
'Base Calendario'[Date] <= DataLimite))

Obrigado
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord