Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.