Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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 ?

Labels (1)
3 Replies
swuehl
Champion III
Champion III

Try

=Interval(

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

, 'm')



marcus_sommer
MVP
MVP

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))