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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sudeep_d
Partner - Creator
Partner - Creator

sum for maximum date issue

contract    yrmnth                 amt 

123           201209                100

123             201208               200

123            201207                 300

543            201206                 400

543             201206              500

543             201205               600

Given the above table...

contract        amt   

123                100

543                900

required the above table..

here amt for max date for each contract is required..

I require the calculation in expression not in calculated dimension

Any help would be appereciated.

Thanks

2 Replies
nagaiank
Specialist III
Specialist III

If contract is the dimension, the following expression will give what you need.

FirstSortedValue(amt,-yrmnth)

Hope this helps.

muniyandi
Creator III
Creator III

Hi sudeep,

just write expression on

sum(if(yrmnth=Aggr(nodistinct max(yrmnth),contract),amt,0))

Hope this helps you

Regards,

Muni