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
Esto puede ser simple, pero soy bastante nuevo en M/DAX. Tengo un conjunto de datos como el siguiente. Quiero fusionar las columnas pero cuando hago eso con un Delimeter o Space o etc., se está dando ese carácter incluso si las celdas son nulas.
Estoy fusionando todas estas columnas y el resultado viene como ABC|| BCD| EFG||| GHI||
Quiero que la salida de merge sea ABC| BCD| EFG| GHI ignorando las celdas nulas.
| Repollo 1 | Repollo 2 | Repollo 3 | Repollo 4 | Repollo 5 | Repollo 6 | Repollo 7 | Repollo 8 | Repollo 9 | Repollo 10 | Repollo 11 |
| abecedario | Bcd | EFG | grabar |
Solved! Go to Solution.
@BI_Analyticz
Primero combine las columnas seleccionadas y luego, vaya a los códigos de la Nueva columna y agregue lo siguiente:
Text.Combine(List.Select(
{[Col 1], [Col 2], [Col 3], [Col 4], [Col 5], [Col 6], [Col 7], [Col 8], [Col 9]},each _<>""), "|")
Pegue el código siguiente en una nueva consulta en blanco en el editor avanzado y compruebe el paso.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyVtJRAiInZxcIw9XNHcKAIHcPT6VYnWgQszglrTgFRBcXg0mIgnIgLoIwK5ViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Col 1" = _t, #"Col 2" = _t, #"Col 3" = _t, #"Col 4" = _t, #"Col 5" = _t, #"Col 6" = _t, #"Col 7" = _t, #"Col 8" = _t, #"Col 9" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Col 1", type text}, {"Col 2", type text}, {"Col 3", type text}, {"Col 4", type text}, {"Col 5", type text}, {"Col 6", type text}, {"Col 7", type text}, {"Col 8", type text}, {"Col 9", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select(
{[Col 1], [Col 2], [Col 3], [Col 4], [Col 5], [Col 6], [Col 7], [Col 8], [Col 9]},each _<>""), "|"))
in
#"Added Custom"
@BI_Analyticz
Primero combine las columnas seleccionadas y luego, vaya a los códigos de la Nueva columna y agregue lo siguiente:
Text.Combine(List.Select(
{[Col 1], [Col 2], [Col 3], [Col 4], [Col 5], [Col 6], [Col 7], [Col 8], [Col 9]},each _<>""), "|")
Pegue el código siguiente en una nueva consulta en blanco en el editor avanzado y compruebe el paso.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyVtJRAiInZxcIw9XNHcKAIHcPT6VYnWgQszglrTgFRBcXg0mIgnIgLoIwK5ViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Col 1" = _t, #"Col 2" = _t, #"Col 3" = _t, #"Col 4" = _t, #"Col 5" = _t, #"Col 6" = _t, #"Col 7" = _t, #"Col 8" = _t, #"Col 9" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Col 1", type text}, {"Col 2", type text}, {"Col 3", type text}, {"Col 4", type text}, {"Col 5", type text}, {"Col 6", type text}, {"Col 7", type text}, {"Col 8", type text}, {"Col 9", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select(
{[Col 1], [Col 2], [Col 3], [Col 4], [Col 5], [Col 6], [Col 7], [Col 8], [Col 9]},each _<>""), "|"))
in
#"Added Custom"
No, este post es diferente. Solo quiero combinar columnas pero excluyendo celdas nulas. ¿Cómo puedo hacer eso? Por favor, ayuda a @CNENFRNL
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.