Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Buenos días.
Les escribo para solicitar su ayuda. Les describo a continuación mi problema:
Tengo un índice de inflación y el costo de un material.
Con el indice de inflación calculo la inflación en el año, comparando el indice de un mes contra el indice del mismo mes del año anterior (para esto hice una medida rapida YoY).
Me interesaría calcular cual sería el costo del material si se hubiese ajustado por inflación. Es decir, tengo que generar una nueva serie que tome el valor en un periodo y lo multiplique por (1+inflación), pero ese valor de inflación está asociado a una fecha un año despues.
A continuación les doy un ejemplo con dos periodos:
Mes | Precio | Indice inflación
1 | 100 | 250
2 | 115 | 275
En este ejemplo, el precio que estoy buscando calcular para el periodo 2 es 100*(275/250)=110. Si el precio del material se hubiese ajustado por inflación debería costar 110, no 115.
Desde ya les agradezco cualquier aporte.
Muchas gracias!
Solved! Go to Solution.
Hi @gntorres ,
Please do like this.
1. Sort the [Year] and [Month] columns.
2. Add an index column(In fact, the index column is a sorting column of year and month).
3. Create a measure.
Measure =
VAR x =
CALCULATE(
MAX(Sheet8[Inflation index]),
FILTER(
ALL(Sheet8),
[Index] = MAX([Index]) - 1
)
)
VAR y =
CALCULATE(
MAX(Sheet8[Price]),
FILTER(
ALL(Sheet8),
[Index] = MAX([Index]) - 1
)
)
RETURN
DIVIDE(
y * MAX([Inflation index]),
x
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gntorres ,
Please do like this.
1. Sort the [Year] and [Month] columns.
2. Add an index column(In fact, the index column is a sorting column of year and month).
3. Create a measure.
Measure =
VAR x =
CALCULATE(
MAX(Sheet8[Inflation index]),
FILTER(
ALL(Sheet8),
[Index] = MAX([Index]) - 1
)
)
VAR y =
CALCULATE(
MAX(Sheet8[Price]),
FILTER(
ALL(Sheet8),
[Index] = MAX([Index]) - 1
)
)
RETURN
DIVIDE(
y * MAX([Inflation index]),
x
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
95 | |
83 | |
70 | |
66 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |