Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
harirao
Post Prodigy
Post Prodigy

DAX: Porcentaje de Diferencia (Semana Actual % - Semana Anterior%)

Hola a todos

Quiero calcular la diferencia % de (Semana actual- Semana anterior). crearon dos nuevas columnas, es decir, la última fecha y la semana anterior.



9 REPLIES 9
harirao
Post Prodigy
Post Prodigy

A continuación se muestra el ejemplo de lo que estoy buscando quiero crear una nueva columna donde debería ver la Diffrence %

Id. de producto "142263-013" para la diferencia wk actual es "-15%"(100%-115%) & "142263-013" -63%(100%-163%)

Tenga en cuenta que Forecastintegrity% es columna calucada

DAX.PNG

saludos

Día

Hola @harirao ,

Vaya al editor de consultas>agregar columna>Columna de índice:

Annotation 2020-04-21 142028.png

A continuación, puede crear una columna calculada para lograr lo que necesita:

Column = 
var a=CALCULATE(MAX('Table'[Forcastintergity%]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])&&'Table'[Product ID]=EARLIER('Table'[Product ID])))
Return
IF(a=BLANK(),BLANK(),'Table'[Forcastintergity%]-a)

Y verás:

Annotation 2020-04-21 142141.png

O puede crear una medida en su lugar:

Measure = 
var a=CALCULATE(MAX('Table'[Forcastintergity%]),FILTER(ALL('Table'),'Table'[Index]<SELECTEDVALUE('Table'[Index])&&'Table'[Product ID]=SELECTEDVALUE('Table'[Product ID])))
Return
IF(a=BLANK(),BLANK(),MAX('Table'[Forcastintergity%])-a)

Y verás:

Annotation 2020-04-21 142258.png

Para el archivo .pbix relacionado, haga clic aquí.

Saludos
Kelly
¿Respondí a tu pregunta? ¡Marca mi puesto como solución!

Gracias por su solución,

Tenga en cuenta: Forecastintegrity% es medida calculada, ambas soluciones no está funcionando.

DAX1.PNGDAX2.PNG

saludos

Día

Hola @harirao ,

Lo siento pensé Que Forecastintegrity% es una columna calculada, si es una medida, sería mejor que primero cambiar a una columna calculada,¿podría pls aconsejarme la expresión dax de Forecastintegrity% si no sabe cómo cambiar?

O si es posible, ¿podría saldar su archivo .pbix a un negocio de onedrive y compartir el enlace con nosotros?

Saludos
Kelly
¿Respondí a tu pregunta? ¡Marca mi puesto como solución!

Hola @v-kelly-msft ,

Por favor, encuentre el siguiente dax utilizado para los cálculos
DAX_cal.PNG

Cuando creé la columna para Forecastintegrity% no estaba obteniendo el resultado correcto, intenté hacer "No resumir" me estaba obteniendo 100%.
DAX_cal1.PNG

saludos

Día

Hola @harirao ,

¡Perdón por la respuesta tardía!

He comprobado las columnas calculadas [Test CURP], [Test SFRP] y su medida [Forecastintegrity%], resultados bajo los cuales son correctos.

Entonces, ¿me aconsejarían la lógica sobre las columnas con la medida? Lo necesito para modificarlos.


Saludos
Kelly
¿Respondí a tu pregunta? ¡Marca mi puesto como solución!

Hola @v-kelly-msft,

¿Puede ayudar en este cálculo?

saludos
Hari

@harirao te refirió a los videos que publiqué anteriormente, lo que no funciona exactamente si has visto estos videos.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@harirao hay tantos mensajes en inteligencia del tiempo aquí pocos enlaces

https://www.youtube.com/watch?v=jclWnA7pEvY

https://www.youtube.com/watch?v=jBPLm5BHl2c



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors