Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17908

Merge columns by name ( if the column name contain the setted text)

$
0
0

Hi All

Please help me.

Can I merge columns in the Query editor by column name (if the colname contain the setted text)?

And how can i do?

 

I would like to merge the columns (in the query editor), which name started with "LinkedStore" string. And this "LinkedStore_* " columns number is dinamically changing.

 

For example:

MergedLinkedStoreColumn.jpg

 

 

I saw in the advance editor, and combine the following but... Smiley Sad

let
    Source = #"HUData (2)",
    ColNames = Table.ColumnNames(Source),
    TransformCommand = List.Transform(ColNames, each {_, type text}),
    #"Changed Type1" = Table.TransformColumnTypes(Source, TransformCommand),
    #"Merged Columns" = Table.CombineColumns(#"Changed Type1", ColNames,Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Merged")
in
    #"Merged Columns"

Thanks a lot


Viewing all articles
Browse latest Browse all 17908

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>