Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hola, estoy buscando ayuda sobre cómo combinar todos los nombres de estado de pedido de proceso para cada número de OCP en la misma línea. Utilizando la fecha de transacción más reciente. Si alguien tiene alguna sugerencia se lo agradecería mucho.
Solved! Go to Solution.
Allí, @a9c4vzz;
1.Por favor, pruébelo en power query (agrupar por).
= Table.Group(#"Changed Type", {"OCP#"}, {{"Ship Date", each List.Max([Ship Date]), type nullable date}, {"TransactionDateTime", each List.Max([TransactionDateTime]), type nullable datetime}, {"a", each Text.Combine([ProcessOrderStatusName], ", "), type nullable text}})
El resultado final se muestra a continuación:
2.Si entiendo el error, puede probar otro como el siguiente:
Aquí está el lenguaje M.
= Table.Group(#"Changed Type", {"OCP#", "ProcessOrderStatusName"}, {{"Ship Date", each List.Max([Ship Date]), type nullable date}, {"TransactionDateTime", each List.Max([TransactionDateTime]), type nullable datetime}})
El resultado final se muestra a continuación:
Saludos
Apoyo a la comunidad Team_ Yalan Wu
Si esta publicación ayuda,entonces considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
Allí, @a9c4vzz;
1.Por favor, pruébelo en power query (agrupar por).
= Table.Group(#"Changed Type", {"OCP#"}, {{"Ship Date", each List.Max([Ship Date]), type nullable date}, {"TransactionDateTime", each List.Max([TransactionDateTime]), type nullable datetime}, {"a", each Text.Combine([ProcessOrderStatusName], ", "), type nullable text}})
El resultado final se muestra a continuación:
2.Si entiendo el error, puede probar otro como el siguiente:
Aquí está el lenguaje M.
= Table.Group(#"Changed Type", {"OCP#", "ProcessOrderStatusName"}, {{"Ship Date", each List.Max([Ship Date]), type nullable date}, {"TransactionDateTime", each List.Max([TransactionDateTime]), type nullable datetime}})
El resultado final se muestra a continuación:
Saludos
Apoyo a la comunidad Team_ Yalan Wu
Si esta publicación ayuda,entonces considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
Hola
En un dato ligeramente más grande, muestre el resultado esperado. Me gustaría ver lo que quiere decir específicamente con la parte de subrayados en negrita: "Combine todos los nombres de estado de pedido de proceso para cada OCP # en la misma línea. Usando la última fecha de transacción."?
@a9c4vzz del todo seguro, cuál es su requisito, pero si tiene una tabla como la siguiente
| ocp | datetime | status | shipDate | Index |
|-----|----------------------|--------|------------|-------|
| s1 | 1/1/2021 12:46:00 PM | a | 2021-01-01 | 1 |
| s1 | 1/1/2021 1:46:00 PM | b | 2021-01-01 | 2 |
| s1 | 1/1/2021 2:46:00 PM | c | 2021-01-01 | 3 |
| s1 | 2/1/2021 2:46:00 PM | d | 2021-02-01 | 4 |
| s2 | 4/1/2021 12:46:00 PM | x | 2021-04-01 | 5 |
| s2 | 5/1/2021 12:46:00 PM | y | 2021-05-01 | 6 |
| s3 | 6/1/2021 12:46:00 PM | z | 2021-06-01 | 7 |
y desea una salida como la siguiente
entonces necesitas una medida como la siguiente
Measure =
VAR _0 =
CALCULATE ( MAX ( 'Table'[shipDate] ), ALLEXCEPT ( 'Table', 'Table'[ocp] ) )
VAR _1 =
CALCULATE (
MAXX (
FILTER (
ADDCOLUMNS (
'Table',
"@concat",
CALCULATE (
CONCATENATEX ( 'Table', 'Table'[status], "," ),
ALLEXCEPT ( 'Table', 'Table'[ocp] )
)
),
[shipDate] = _0
),
[@concat]
),
ALLEXCEPT ( 'Table', 'Table'[ocp] )
)
RETURN
_1
#"Grouped Rows" = Table.Group(Source, vDbo_vActiveOrderDashBoardDetails, {"ProcessOrderNbr"}, {{"Order Status", each Text.Combine([PhaseStatusValue],", "), type text}})
in
#"Grouped Rows"
Probé este código pero estoy recibiendo este error: