Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

dayna_litherlan
Contributor

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

Re: Help trying to sum using aggr where multiple records exist

May be try this

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