March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hola, tengo un conjunto de datos como tal
Hay un total de 6 columnas con ID y fechas para la siguiente categoría:
1. Hecho
2. Actualizado
3. Verificado
Las columnas Actualizadas y Verificadas pueden tener un valor nulo.
Por favor, aconseje cómo puedo transformar en el resultado esperado en el Editor de consultas? Gracias
Done_BY | Done_Date | Updated_by | Update_Date | Verified_by | Verified_Date |
A | 10/2/2022 | F | 13/2/2022 | M | 13/2/2022 |
B | 10/2/2022 | G | 13/2/2022 | ||
C | 10/2/2022 | N | 14/2/2022 | ||
D | 11/2/2022 | ||||
E | 11/2/2022 | J | 14/2/2022 | ||
F | 11/2/2022 | K | 14/2/2022 | O | 15/2/2022 |
G | 11/2/2022 | ||||
H | 12/2/2022 | L | 13/2/2022 | P | 13/2/2022 |
Salida que quería
Fecha | Por | Modo |
10/2/2022 | A | Creado |
10/2/2022 | B | Creado |
10/2/2022 | C | Creado |
11/2/2022 | D | Creado |
11/2/2022 | E | Creado |
11/2/2022 | F | Creado |
11/2/2022 | G | Creado |
12/2/2022 | H | Creado |
13/2/2022 | F | Actualizado |
13/2/2022 | G | Actualizado |
13/2/2022 | M | Verificado |
13/2/2022 | L | Actualizado |
13/2/2022 | P | Verificado |
14/2/2022 | J | Actualizado |
14/2/2022 | N | Verificado |
14/2/2022 | K | Actualizado |
15/2/2022 | O | Verificado |
@j_gan2022 , Compruebe este código
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTI00DfSNzIwMgKy3UB8YwTfF4UfqxOt5ISmwx1NhwIYg1Q6o6lUgGI/kLgJspkuIBFDTJUIs1zRVHihmIGs0g1NpTeaSn8Q3xTZdneCtnuAVBghVPig+TkANZRiAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Done_BY = _t, Done_Date = _t, Updated_by = _t, Update_Date = _t, Verified_by = _t, Verified_Date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Done_BY", type text}, {"Done_Date", type date}, {"Updated_by", type text}, {"Update_Date", type text}, {"Verified_by", type text}, {"Verified_Date", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Done_BY"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Columns", "Attribute", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Attribute.1", "Attribute.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type1", List.Distinct(#"Changed Type1"[Attribute.2]), "Attribute.2", "Value", List.Max)
in
#"Pivoted Column"
Se requiere poca limpieza. Agregar esto a una consulta en blanco en power query
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.