cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Cómo combinar omitir las celdas NULL

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 1Repollo 2Repollo 3Repollo 4Repollo 5Repollo 6Repollo 7Repollo 8Repollo 9Repollo 10Repollo 11
abecedario Bcd EFG grabar
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@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"

Fowmy_0-1622720393431.png


View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@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"

Fowmy_0-1622720393431.png


No, este post es diferente. Solo quiero combinar columnas pero excluyendo celdas nulas. ¿Cómo puedo hacer eso? Por favor, ayuda a @CNENFRNL

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors