Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
TABLA RAW
| NOMBRE DEL GRUPO | NÚMERO DE TICKET | PRIORIDAD | LÍNEA |
| A | INC111 | 1 | SÍ |
| A | INC112 | 2 | SÍ |
| A | INC113 | 4 | SRA. |
| B | INC222 | 2 | CLIENTE |
| B | INC221 | 3 | SÍ |
| B | INC223 | 5 | SRA. |
| C | INC331 | 3 | DD |
| C | INC332 | 1 | SRA. |
| C | INC333 | 4 | GH |
NECESITO ASÍ
| NOMBRE DEL GRUPO | NÚMERO DE TICKET | PRIORIDAD | LÍNEA |
| A | INC111 | 1 | SÍ |
| A | INC112 | 2 | SÍ |
| A | INC113 | 4 | SRA. |
| A | 3 | ||
| B | INC222 | 2 | CLIENTE |
| B | INC221 | 3 | SÍ |
| B | INC223 | 5 | SRA. |
| B | 3 | ||
| C | INC331 | 3 | DD |
Esto se puede hacer en Power Query. Agregue un paso personalizado que haga referencia al paso anterior, elimine todas las columnas excepto el nombre del grupo, elimine los duplicados y agregue una columna personalizada llamada NÚMERO DE TICKET con un valor de "3" y luego agregue este paso al paso anterior al paso personalizado. Vea el ejemplo de script M a continuación
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUfL0czY0NAQyQDjYUylWB0ncCMgwwiJuDGSYALFvMFjcCSJuZART7+zj6eoXgioHMt8YYRZcHCRmijDLGSJubAxT7+KCKm4EdSu6epib3D2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"GROUP NAME" = _t, #"TICKET NUMER" = _t, PRIORITY = _t, LINE = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"GROUP NAME", type text}, {"TICKET NUMER", type text}, {"PRIORITY", Int64.Type}, {"LINE", type text}}),
Custom1 = #"Changed Type",
#"Removed Other Columns" = Table.SelectColumns(Custom1,{"GROUP NAME"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns"),
#"Added Custom" = Table.AddColumn(#"Removed Duplicates", "TICKET NUMER", each "3", type text),
Custom2 = Table.Combine({#"Changed Type",#"Added Custom"}),
#"Sorted Rows" = Table.Sort(Custom2,{{"GROUP NAME", Order.Ascending}, {"TICKET NUMER", Order.Descending}})
in
#"Sorted Rows"
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.