Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hola
Me pregunto si hay alguna manera inteligente de despivot columnas en Power BI con dos tipos de columnas (ventas equivalentes por mes y cantidad por mes) en consulta directa.
De:
Cliente | Ciudad | ID de producto | Junio 2020 (Importe de ventas) | Junio 2020 (Cantidad) | Julio 2020 (Importe de ventas) | Julio 2020 (Cantidad) | Agosto 2020 (Importe de ventas) | Agosto 2020 (Cantidad) |
A | X | 1234 | 100 | 1 | 1000 | 10 | 10000 | 100 |
B | Y | 1345 | 50 | 1 | 2500 | 50 | 5000 | 100 |
C | Z | 1456 | 10 | 1 | 50 | 5 | 0 | 0 |
Para:
Ciudad | ID de producto | Fecha | Importe de ventas | Cantidad | |
A | X | 1234 | Junio de 2020 | 100 | 1 |
A | X | 1234 | Julio de 2020 | 1000 | 10 |
A | X | 1234 | Agosto de 2020 | 10000 | 100 |
B | Xy | 1345 | Junio de 2020 | 50 | 1 |
B | Xy | 1345 | Julio de 2020 | 2500 | 50 |
B | Xy | 1345 | Agosto de 2020 | 5000 | 100 |
C | Xyz | 1456 | Junio de 2020 | 10 | 1 |
C | Xyz | 1456 | Julio de 2020 | 50 | 5 |
C | Xyz | 1456 | Agosto de 2020 | 0 | 0 |
Gracias de antemano por cualquier pista!,
Diamantes
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
hola @AllisonKennedy ,
gracias por su respuesta, sin embargo pocos pasos no se admiten en consulta directa (por ejemplo: Dividir columna por delimitador).
saludos
Diamantes
Hola @karo ,
Compruebe el hilo similar a continuación:
https://community.powerbi.com/t5/Desktop/Using-dax-to-unpivot-a-table/td-p/421116