lundi 27 janvier 2020

Excel pivot tables sum if a condition is met

I have an excel table that looks something like this

Queue   Duration(in seconds) Language
a            310                FR
a            342                EN
b            220                FR
a            654                FR
c            340                EN
c            157                EN
a            163                FR
b            713                EN
b            436                FR
b            185                EN
c            264                FR
a            365                EN

i would like a table that looks like this

Queue    Total Duration          Total Duration
         of English calls        of French Calls
a             707                   1127
b             898                   656
c             497                   264

I can use a filter in a pivot table and manually create my table but this didn't seem like an elegant solution. And my actual table is 47 columns and 170,000 rows. I tried using a calculated field but I couldn't figure out how to sum if the language field met a certain criterion.

I can also use the language field in the rows but then I get separate lines for French and English and I cannot compare them in charts and graphs.

I would appreciate any suggestions.

Aucun commentaire:

Enregistrer un commentaire