This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Como calcular o valor do acumulado do IPCA no ano até o mês atual de forma que o acumulado do mês de janeiro é o proprio janeiro e os demais é definido pela seguinte formula no excel: =(1+IPCA_NO_MÊS/100)*IPCA_NO_MÊS_ANTERIOR)+IPCA_NO_MÊS
| Tabela IPCA mês a mês - 2018 | ||
| IPCA | Valor (%) | Acumulado do ano (%) |
| jan/18 | 0,29 | 0,29 |
| fev/18 | 0,32 | 0,61 |
| mar/18 | 0,09 | 0,70 |
| abr/18 | 0,22 | 0,92 |
| mai/18 | 0,4 | 1,33 |
| jun/18 | 1,26 | 2,60 |
| jul/18 | 0,33 | 2,94 |
| ago/18 | -0,09 | 2,85 |
| set/18 | 0,48 | 3,34 |
| out/18 | 0,45 | 3,81 |
| nov/18 | -0,21 | 3,59 |
| dez/18 | 0,15 | 3,75 |
Fiz essa solução em Power Query:
let _index = [Index] in
List.Accumulate(Table.SelectRows(#"Added Index", each [Index] <= _index)[#"Valor (%)"],
0, (s,c) =>
(1 + c / 100) * s + c
)
esse é o mcode:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RczLDkAwEIXhd5l1hY5LeJbGoqKEoIlLF56eTM3YfjnnNwZmu6W6BgWZwgZaZWBwgSVHktXuLFnc2E4EeTOxFATz9YW1wuqTRcJ5zIw+SiLlw53SqUn89UtJsvkgN9REvbt5pN9R+wA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IPCA = _t, #"Valor (%)" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"IPCA", type date}, {"Valor (%)", type number}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"IPCA", "Date"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 0, 1),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each let _index = [Index] in
List.Accumulate(Table.SelectRows(#"Added Index", each [Index] <= _index)[#"Valor (%)"],
0, (s,c) =>
(1 + c / 100) * s + c
))
in
#"Added Custom"
Vou tentar fazer em DAX também.
Tenta essa medida:
No powerbi existe a coluna data que está relacionada com minha dCalendario, a minha dificudade está em fazer o calculo dos juros compostos do IPCA porque não é um simples calculo acumulado até o mês.
Formula de calculo no excel: (1+IPCA_NO_MÊS/100)*IPCA_NO_MÊS_ANTERIOR)+IPCA_NO_MÊS
No relatório é fácil, basta criar uma tabela, colocar o ANO, depois valor e pronto.
Agora por dax, também fico no aguardo.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 7 | |
| 6 | |
| 6 |