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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Último valor de un grupo/categoría

Hola

Necesito encontrar el valor de flujo de trabajo más reciente según TopicID . Esto debe venir como una columna calculada como se muestra en la imagen de abajo (resaltada en amarillo)

Akshay167_0-1698084151136.png

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Akshay167,

Aquí una solución en Power Query:

tackytechtom_0-1698091320304.png

Aquí el código M:

tackytechtom_1-1698091406446.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJ0cnYBUkYGRsa6Bpa6BoZKsTqYMoYG+GSMcMoYw2Vc3dw9kGVMcMqY4pQxA8sYAYWigADT1egyCHtAMpFAgGZaLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [TopicID = _t, Workflow = _t, Timestamp = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"TopicID", Int64.Type}, {"Workflow", type text}, {"Timestamp", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"TopicID"}, {{"MaxTimestamp", each List.Max([Timestamp]), type nullable date}}),
    #"Merged Queries" = Table.NestedJoin(#"Grouped Rows", {"TopicID", "MaxTimestamp"}, #"Changed Type", {"TopicID", "Timestamp"}, "Grouped Rows", JoinKind.LeftOuter),
    #"Expanded Grouped Rows" = Table.ExpandTableColumn(#"Merged Queries", "Grouped Rows", {"Workflow"}, {"Grouped Rows.Workflow"}),
    #"Merged Queries1" = Table.NestedJoin(#"Changed Type", {"TopicID"}, #"Expanded Grouped Rows", {"TopicID"}, "Expanded Grouped Rows", JoinKind.LeftOuter),
    #"Expanded Expanded Grouped Rows" = Table.ExpandTableColumn(#"Merged Queries1", "Expanded Grouped Rows", {"Grouped Rows.Workflow"}, {"New Workflow"})
in
    #"Expanded Expanded Grouped Rows"

Hazme saber si esto ayuda 🙂

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors