Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with Aggr function

Hi everybody,

i have this example:

 

IDDOCSTATEDATE
1231OPEN01/04/2016
1232CLOSE30/03/2016
1233PROGS15/03/2016
1241OPEN03/04/2016
1242CLOSE15/05/2016

I need to create a bar char that counts:

To ID=123 ---> bar char shows 1 in 01/04/2016 (in max date)

To ID=124 ---> bar char shows 1 in 15/05/2016 (in max date)

I dont know if use an aggr function to group by ID, and use max(Date) to show data.

Besides, in another char, i have to group by state (the state of last date).

I only use char Expressions,

Can anyone help me?

Thanks a lot!!

Regards,

Paula.

11 Replies
Anonymous
Not applicable
Author

Thank you Sunny,

i have resolve that problem with:

=sum({<DATE>} Aggr(If(DATE = Max({<DATE>}TOTAL <ID> DATE), 1, 0), ID, DATE))


and for STATE, i think is the same adding the STATE you want... Right??


=sum({<DATE=, STATE={'OPEN'}>} Aggr(If(DATE = Max({<DATE=, STATE={'OPEN'}>}TOTAL <ID> DATE), 1, 0), ID, DATE))


Thank you!

sunny_talwar

I would guess so... try it out and see if it works or not