Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Help trying to sum using aggr where multiple records exist

Good Morning All!

I think what I'm trying to do is fairly simple but I'm having issues achieving it this morning. I've attached a file where I need to sum the value for event.duration_m (and it uses a bit of set analysis), but as the row can sometimes be duplicated for the event.id, the value is too high - as there's a row for each hour the event occurs (i.e. if the duration is 4 hours long, we'll get four records with the same id).

I think I need to aggregate it over the event.id for distinct values, but this doesn't seem to work for me. In the attached file, I've selected an example record to where my problem is - if you could help it would be really appreciated!

Many thanks in advance!

Kind Regards,

Dayna

1 Reply
sunny_talwar

May be try this

Sum(Aggr(Only(event.duration_m), event.id))