Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
uau. No pensé que esto sería tan complicado. En el Editor de Power Query, ¿cómo puedo convertir la tabla siguiente agrupando a los administradores de almacén en dos categorías, si fallaron en un bucket de auditoría como "Error al menos 1 auditoría", si nunca han fallado, buckets como "Pasó todas las auditorías":
Tabla inicial
Administrador de tiendas | Infracción de auditoría |
233 | Auditoría fallida |
233 | Auditoría aprobada |
233 | Auditoría aprobada |
238 | Auditoría aprobada |
238 | Auditoría aprobada |
240 | Auditoría fallida |
249 | Auditoría aprobada |
249 | Auditoría aprobada |
249 | Auditoría aprobada |
Tabla final resultante:
Administrador de tiendas | Error de auditoría o pasado |
233 | Error al menos 1 auditoría |
238 | Aprobado todas las auditorías |
240 | Error al menos 1 auditoría |
249 | Aprobado todas las auditorías |
La ayuda es muy apreciada aquí. No podía creer que esto fuera tan difícil.
Solved! Go to Solution.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjI2VtJRckvMzElNUXAsTcksUYrVgQkHJBYXEydsQYqwiQFWK00ssasmWjgWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Store Manager" = _t, #"Audit Violation" = _t]),
#"Grouped Rows" = Table.Group(Source, {"Store Manager"}, {{"Result", each let l = [Audit Violation], res = List.Accumulate(l, false, (s,c) => s or Text.Contains(c, "Failed", Comparer.OrdinalIgnoreCase)) in if res then "Failed at least once" else "Passed"}})
in
#"Grouped Rows"
Sólo por diversión,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjI2VtJRckvMzElNUXAsTcksUYrVgQkHJBYXEydsQYqwiQFWK00ssasmWjgWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Store Manager" = _t, #"Audit Violation" = _t]),
#"Grouped Rows" = Table.Group(Source, {"Store Manager"}, {{"Result", each let l = [Audit Violation], res = List.Accumulate(l, false, (s,c) => s or Text.Contains(c, "Failed", Comparer.OrdinalIgnoreCase)) in if res then "Failed at least once" else "Passed"}})
in
#"Grouped Rows"
Sólo por diversión,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |