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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregation in aggregation

Hi,

I want to do something like thi in an expression :

= Avg( {$ <SITUATION_SOL= {"Fermée"}>} min(DATE_CHGT) -  max(DATE_CHGT))

DATE_CHGT is a date and SITUATION_SOL the state of an object SOL.

It seems to be impossible tu put aggregation in aggregation.

Does anyone have a solution to do this ?

Thanks

Labels (1)
2 Replies
swuehl
Champion III
Champion III

You have to use advanced aggregation to embed an aggregation into another aggregation, please look into the aggr() function and the help.

The aggr() function needs one or more dimensions to calculate min(DATE_CHGT) - max(DATE_CHGT) for, and without knowing more about your settings and data model, it's hard to help you here.

But anyway, I think you will succeed with using aggr() function.

Regards,

Stefan

Not applicable
Author

Thanks for your help.

I have done this : =avg(aggr(max(DATE_CHGT),SOLID)-aggr(min(DATE_CHGT),SOLID))