Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggr function not working

here is what I'm trying to do:

=aggr(avg({<Versand_Dat.VERSADAT = {'>=$(=(Today() - $(vMaxWoche) * 7))<=$(=(Today() - $(vMinWoche) * 7))'}>}Versand_Dat.VERSADAT),Versand_Dat.IDENTNR)

Im trying to get the avg shipping date for every productID and then in my chart I want the ProductID(Versand_Dat.IDENTNR) to be shown but there is always the date shown does anyone know why maybe Im handling the aggr function wrong I appriciate any help even the explanation of the aggr function from scratch

regards,

MT

2 Replies
swuehl
MVP
MVP

MT, your aggr() function is building an in-chart / inline  table with dimension IDENTNR and an average VERSADAT as expression.

Not sure why you expect to see IDENTNR as outcome, or what you want to do with the VERSADAT then (or how you get to the IDENTNR from the avg VERSADAT).

giakoum
Partner - Master II
Partner - Master II

Aggr is used to aggregate the expression included.

So what you do here is aggregating the avg over productid. For each product id, this function will return a date value. If you use it in a chart, you simply need the poduct id as a dimension, no aggr needed.

maybe some more info would help.