The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hola
Tengo los siguientes datos por región, Producto y Cliente y quiero resumir los valores por región y los cambios positivos y negativos por cliente y producto.
Gracias de antemano.
Datos | |||||
Región | Cliente | Producto | 2019 | 2020 | Diff |
Sur | 123 | AA | 100 | 200 | 100 |
Sur | 124 | AA | 200 | 100 | -100 |
Norte | 125 | AA | 100 | 400 | 300 |
Norte | 126 | AA | 500 | 100 | -400 |
Sur | 123 | Desactivado | 200 | 100 | -100 |
Sur | 124 | Desactivado | 300 | 100 | -200 |
Norte | 125 | Desactivado | 100 | 200 | 100 |
Norte | 126 | Desactivado | 500 | 100 | -400 |
2,000 | 1,300 | -700 | |||
Salida necesaria | Por producto y cliente | ||||
2019 | 2020 | Diff | Positivo | Negativo | |
Sur | 800 | 500 | -300 | 100 | -400 |
Norte | 1,200 | 800 | -400 | 400 | -800 |
2,000 | 1,300 | -700 | 500 | -1,200 |
No @CNENFRNL,
Gracias por la respuesta rápida, Sumx y la función de dax condicional funciona muy lento (más de 30 minutos).
mi tamaño de archivo pbxi es de 27MB. ¿tenemos otra manera de trabajarlo rápidamente.
Gracias
No @punnas1
Consulte los artículos siguientes para ver si pueden ayudar a optimizar las expresiones DAX.
https://www.sqlbi.com/articles/optimizing-dax-expressions-involving-multiple-measures/
https://maqsoftware.com/expertise/powerbi/dax-best-practices
Saludos
Equipo de apoyo a la comunidad _ Jing Zhang
Hola, @punnas1, en general, DAX favorece la tabla unidimensional; por lo tanto, despvoro el conjunto de datos original antes de crear las medidas adecuadas. Se adjunta un archivo pbix para su referencia.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |