Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
May be try this
Sum(Aggr(Only(event.duration_m), event.id))