Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Certification Exam Sale - 40% off. Register by June 30, 2020. GET DETAILS
Not applicable

Nested Aggregation

Hello Everyone,

I have calculated a duration using this formula :

Interval(Min({$<Location-={'X'}>}InnerTMSTP) - Min({$}InnerTMSTP), 'm')

This gives me a Nu,ber which corresponds to the duration in minutes.

I wanted to sum all the duration for my different references but when I wrote :

Sum(Interval(Min({$<Location-={'A99***'}>}InnerTMSTP) - Min({$}InnerTMSTP), 'm') )

The software tells me I have an error due to nested aggregation.

Do you know what is that about ?

3 Replies
Highlighted
MVP
MVP

Re: Nested Aggregation

Try

=Interval(

Sum ( Aggr( Min({$<Location-={'A99***'}>}InnerTMSTP) - Min({$} InnerTMSTP), YourReferencesField ))

, 'm')



Highlighted
MVP & Luminary
MVP & Luminary

Re: Nested Aggregation

You need to wrap your expression in an aggr() maybe something like this:

Sum(aggr(Interval(Min({$<Location-={'A99***'}>}InnerTMSTP) - Min({$}InnerTMSTP), 'm'), Dimensions))


- Marcus

Highlighted
MVP
MVP

Re: Nested Aggregation

SUM(Aggr(Interval(Min({$<Location-={'X'}>}InnerTMSTP) - Min({$}InnerTMSTP), 'm'),Ref))