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: 
Not applicable

sum(Amount) with lastest version of every Key

Hi Guys,

can you tell me, how can I use sum(Amount) by KeyNr, within the last version of it in backend?

I want for example sum(amount) all KeyNr from periode january to july ..

like:

sum(amount)->within only max(version)

10 Replies
Anonymous
Not applicable
Author

try set Analysis

sum({<version={'$(=max(version)'}>}amount

Not applicable
Author

it didnt work

sum({<VersH={'$(=max(VersH)'}>}LineAmountA)

edit:

money(sum({<VersH={$(=max(VersH))}>}LineAmountA))

works now without '..'

Anonymous
Not applicable
Author

can you post how your Detail data looks like and what should be expected result?

Not applicable
Author

Now I have the problem, that the versionnr arent the same, by keynr ..

some keynr has version 5 as max, other version 3 as max(version),

so how can I set all max version of several keynr?

Anonymous
Not applicable
Author

sorry I donot understand your requirements

can you post a small example application?

Not applicable
Author

KeynrVersHmax(version) of each Keynr->sum(LineAmountA)
123
243
3545
464
476
544
554
565

this is the table what I#ve got:

if I use :

money(sum({< VersH={$(=max(VersH))}>}LineAmountA))

It only shows/sum the key within max(versH) --> in this example =7

..

so, how can I sum all the key with their max(Versh) ?

to get this:

KeynrVersHsum...
123
243
3545
476
565
Anonymous
Not applicable
Author

I used a small inline table with your data and I got your final table

please have a look if that's what you want

Not applicable
Author

nearly..

what I need to sum is not 74.

I need:

3+3+45+5+6=62

robert_mika
Master III
Master III

aggr(max(Amount),KeyNr)

16-Apr-15 4-05-40 PM.jpg