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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Set Analysis Calculation of Lost Amount based on MAx(date) and the date Before it direcctly

hi Pardib this my sampl Data i used your Expression it works but my request is i need to show a table that calculate the amount in max date VS  the amount in the Previous date right before it here is my example:

IDBalanceDate
0701920994.093/19/2015
0701921035.5811/26/2014
0701921077.0712/31/2013
07019200071/31/2014
07019170002/28/2014
07019180004/30/2014
07019120005/31/2014
07019100006/30/2014
07019140007/31/2014
07019250008/31/2014
07019550009/25/2014
0701915300010/17/2014
005341445513/19/2015
0053415342011/26/2014
0053416170812/31/2013
00534250001/31/2014
00534260002/28/2014
00534290004/30/2014
00534350005/31/2014
00534450006/30/2014
00534260007/31/2014
00534290008/31/2014
00534220009/25/2014
0053421000

10/17/2014

in this Case i need my output will show if no selection on any field the Amount on max date VS the previous one in my example :

ID                       MaxDate (3/19/2015)            PreviousDate(11/26/2014)       Lost Amount

07019                20994.09                                21035.58                                    20994.09-21035.58=(41.49)

00534                144551                                   153420                                       153420-144551=8869

if i select on for example  10/17/2014 i get

       

ID                       MaxDate (10/17/2014)            PreviousDate(9/25/2014)       Lost Amount

07019                153000                                      55000                                        153000  - 55000=98000

00534                21000                                        22000                                         21000-22000  =(1000)

0 Replies