Forum Discussion
Anonymous
8 years agoNot applicable
Combine two columns with same name from different table in visualisation
I have two sets of table as below: cust_name A B C John 5 5 3 Mary 3 Ken 4 cust_name C D E John 2 1 Amy 1 4 Julia 6 1 How ...
- 8 years ago
after appending the queries for tables,you can create a dax query to summarise the data for the same name
- Anonymous8 years ago
HI Anonymous,
You can also try to use unpivot columns and pivot column function to achieve your requirement.
Sample: create new blank query to store transformed records.
let Source = Table.Combine({Table.UnpivotOtherColumns(#"Table1",{"cust_name"}, "Attribute", "Value"),Table.UnpivotOtherColumns(#"Table2",{"cust_name"}, "Attribute", "Value")}), #"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[Attribute]), "Attribute", "Value", List.Sum) in #"Pivoted Column"Regards,
Xiaoxin Sheng
Hardik
Continued Contributor
8 years agoafter appending the queries for tables,you can create a dax query to summarise the data for the same name
Anonymous
8 years agoNot applicable
Hi Hardik, is there any other alternative without appending the table?
- Anonymous8 years agoNot applicable
HI Anonymous,
You can also try to use unpivot columns and pivot column function to achieve your requirement.
Sample: create new blank query to store transformed records.
let Source = Table.Combine({Table.UnpivotOtherColumns(#"Table1",{"cust_name"}, "Attribute", "Value"),Table.UnpivotOtherColumns(#"Table2",{"cust_name"}, "Attribute", "Value")}), #"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[Attribute]), "Attribute", "Value", List.Sum) in #"Pivoted Column"Regards,
Xiaoxin Sheng