Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
Syndicate_Admin
Administrator
Administrator

Preparación de datos en el Editor de consultas

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_BYDone_DateUpdated_byUpdate_DateVerified_byVerified_Date
A10/2/2022F13/2/2022M13/2/2022
B10/2/2022G13/2/2022
C10/2/2022 N14/2/2022
D11/2/2022
E11/2/2022J14/2/2022
F11/2/2022K14/2/2022O15/2/2022
G11/2/2022
H12/2/2022L13/2/2022P13/2/2022

Salida que quería

FechaPorModo
10/2/2022ACreado
10/2/2022BCreado
10/2/2022CCreado
11/2/2022DCreado
11/2/2022ECreado
11/2/2022FCreado
11/2/2022GCreado
12/2/2022HCreado
13/2/2022FActualizado
13/2/2022GActualizado
13/2/2022MVerificado
13/2/2022LActualizado
13/2/2022PVerificado
14/2/2022JActualizado
14/2/2022NVerificado
14/2/2022KActualizado
15/2/2022OVerificado
1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors