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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to calculate aging (select earliest & latest date in a list) urgent !!!

IDClassCreated
2014Class A3/17/2015 11:14
2014Class A3/16/2015 9:49
2014Class A2/14/2015 7:29
2014Class A12/11/2014 4:42
2014Class B3/13/2015 15:56
2014Class B2/10/2015 14:50
2014Class B10/10/2014 15:52
2014Class B1/1/2015 13:12
2014Class C3/3/2015 15:38
2014Class C3/3/2015 14:44

Need help on how to solve this problem.

I want to select the earliest date for class A & latest date from class B & C to calculate the aging.

Example:

If Aging A to B, A should be 12/11/2014 4:42 minus B 3/13/2015 15:56.

If Aging A to C, A should be 12/11/2014 4:42 minus C 3/3/2015 15:38.

Kindly help. Thanks.

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Do you want to choose yourself or that should be always there?

B

=max({1<Class={'Class B'}>} Created)-min({1<Class={'Class A'}>} Created)

C

=max({1<Class={'Class C'}>} Created)-min({1<Class={'Class A'}>} Created)

View solution in original post

7 Replies
robert_mika
Master III
Master III

The latest C is 3/3/2015 14:44 so why 3/3/2015 15:38?

Anonymous
Not applicable
Author

Hi robert, latest means the new one created.

Not applicable
Author

Aging B-A

=Max({<ID={2014},Class={'Class B'}>} Date(Created)) - Min({<ID={2014}, Class={'Class A'}>} Date(Created))

Aging C-A

=Max({<ID={2014},Class={'Class C'}>} Date(Created)) - Min({<ID={2014}, Class={'Class A'}>} Date(Created))

robert_mika
Master III
Master III

Do you want to choose yourself or that should be always there?

B

=max({1<Class={'Class B'}>} Created)-min({1<Class={'Class A'}>} Created)

C

=max({1<Class={'Class C'}>} Created)-min({1<Class={'Class A'}>} Created)

Not applicable
Author

  • Hi ahmad,

could you please explain how the selection should be for your ageing?

Anonymous
Not applicable
Author

thanks robert

ankitaag
Partner - Creator III
Partner - Creator III

B-A

=Max({<ID={2014},Class={'Class B'}>} Date(Date#(Created,'MM/DD/YYYY hh:mm'),'MM/DD/YYYY')) - Min({<ID={2014}, Class={'Class A'}>} Date(Date#(Created,'MM/DD/YYYY hh:mm'),'MM/DD/YYYY'))

C-A

=Max({<ID={2014},Class={'Class C'}>} Date(Date#(Created,'MM/DD/YYYY hh:mm'),'MM/DD/YYYY')) - Min({<ID={2014}, Class={'Class A'}>}Date(Date#(Created,'MM/DD/YYYY hh:mm'),'MM/DD/YYYY'))