March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hola
Me puedes ayudar? Estoy intentando calcular el incremento de precio por tamaño de producto.
Mi tabla esta de la siguiente manera:
Precio | |
REFRESCO 16 OZ | $55 |
REFRESCO 22 OZ | $60 |
REFRESCO 32 OZ | $65 |
REFRESCO 44 OZ | $70 |
Necesito que mi formula me diga cual es el porcentaje de incremento entre cada tamaño de refresco, me gustaría que la formula me mostrara la formula de incremento:
Precio | Incremento | |
REFRESCO 16 OZ | $55 | N/A |
REFRESCO 22 OZ | $60 | 9.09% |
REFRESCO 32 OZ | $65 | 8.33% |
REFRESCO 44 OZ | $70 | 7.69% |
Muchas gracias!
Solved! Go to Solution.
Hi @Lucy_Ramirez ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2)Click "transform data" to go to the power query editor and add a index column.
(3) We can create a measure.
Incremento = VAR _a= CALCULATE(MAX('Table'[Precio]),FILTER(ALL('Table'),'Table'[Index]=MAX('Table'[Index])-1))
var _b=MAX('Table'[Precio])
var _c=DIVIDE(_b-_a,_a,0)
return IF(_c=0,"N/A",_c)
(4) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Lucy_Ramirez ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2)Click "transform data" to go to the power query editor and add a index column.
(3) We can create a measure.
Incremento = VAR _a= CALCULATE(MAX('Table'[Precio]),FILTER(ALL('Table'),'Table'[Index]=MAX('Table'[Index])-1))
var _b=MAX('Table'[Precio])
var _c=DIVIDE(_b-_a,_a,0)
return IF(_c=0,"N/A",_c)
(4) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Lucy_Ramirez , Create a new column
New colum =
var _min = minx(filter(Table, [Item] =earlier([Item])), [Size])
var _price= maxx(filter(Table, [Item] =earlier([Item]) && [Size] =_min), [Precio])
return
divide([Precio] -_price, _price)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |