Forum Discussion
Anonymous
8 years agoNot applicable
add different columns from different tables without using sum function
hi Team, I have 2 different tables Table1 ID Jun:A Jul:A Aug:A 123 5,643 9,876 5,820 456 ...
Anonymous
8 years agoNot applicable
Hi Anonymous,
I'd like to suggest you unpivot these column to attribute and value, then you can simply use calculate with attribute equal to specific value to get result.
Unpivot Data Using Excel Power Query
Measure =
VAR currID =
MAX ( Table1[ID] )
VAR merged =
UNION ( ALLSELECTED ( Table1 ), ALLSELECTED ( Table2 ) )
VAR attrList = { "Jun:A", "Jul:F", "Aug:F" }
RETURN
SUMX ( FILTER ( merged, [ID] = currID && [Attribute] IN attrList ), [Value] )
Regards,
Xiaoxin Sheng