Forum Discussion

Jaime123's avatar
Jaime123
Regular Visitor
8 years ago
Solved

Sum values from different columns based on row data

Hi all,

I am trying to create a new table where I can summarize all activities by "owner", the problem I am having is that activities are listed in different columns in the original table. Here is an example of the original table:

 

NameEmailsSurveysVideos
John240
Mary131
Paul043
Mark311
John311
Mary300
Paul132
Mark001

 

And here is the table I am trying to create:

NameActivityCount
JohnEmails5
MaryEmails4
PaulEmails1
MarkEmails3
JohnSurveys5
MarySurveys3
PaulSurveys7
MarkSurveys1
JohnVideos1
MaryVideos1
PaulVideos5
MarkVideos2

 

I will appreciate any help to create the new table, or any ideas on how to create the new table.

 

Regards.

J

  • Seems a straightforward unpivot of everything but the name, then group by the name/old column headers task in Power Query

1 Reply

  • jthomson's avatar
    jthomson
    Solution Sage

    Seems a straightforward unpivot of everything but the name, then group by the name/old column headers task in Power Query