Forum Discussion
combinations columns
- 5 years ago
Hi marab ,
Based on your description, you need to duplicate the soure table in power query editor and do some transformations like unpiviot columns, remove duplicates etc. for it to summarize a value table which contains all the roles from the source table. The whole query in power query editor is like this:
let Source = Table, #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Index Repertitiions"}, "Attribute", "Value"), #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Index Repertitiions", "Attribute"}), #"Removed Duplicates" = Table.Distinct(#"Removed Columns") in #"Removed Duplicates"Close and apply it in power query editor, then create a calculated column in the source table to combine these roles:
Group = CONCATENATEX ( 'Value', 'Value'[Value], "_" )You can also use the optional patameters in CONCATENATEX() to define its order, please refer: CONCATENATEX()
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi marab ,
Based on your description, you need to duplicate the soure table in power query editor and do some transformations like unpiviot columns, remove duplicates etc. for it to summarize a value table which contains all the roles from the source table. The whole query in power query editor is like this:
let
Source = Table,
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Index Repertitiions"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Index Repertitiions", "Attribute"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Columns")
in
#"Removed Duplicates"
Close and apply it in power query editor, then create a calculated column in the source table to combine these roles:
Group =
CONCATENATEX ( 'Value', 'Value'[Value], "_" )
You can also use the optional patameters in CONCATENATEX() to define its order, please refer: CONCATENATEX()
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.