Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

Try

=Interval(

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

, 'm')



marcus_sommer

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

MK_QSL
MVP
MVP

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