Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sinanozdemir
Specialist III
Specialist III

Equivalent of sum() over (partition by) SQL statement in QlikView

Hi all,

I am quite new to QlikView and I have a fairly simple table. What I want to achieve in qlikview load script is to be able to sum Amount over Name column. Essentially, have Overall Total column populated in the load script.

Capture.PNG

Any help is much appreciated.

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

in load script I think you can

a:

load name, date, amount from yourdbtable;

left join (a) load name, sum(amount) as overall resident a group by name;

View solution in original post

4 Replies
maxgro
MVP
MVP

in load script I think you can

a:

load name, date, amount from yourdbtable;

left join (a) load name, sum(amount) as overall resident a group by name;

sinanozdemir
Specialist III
Specialist III
Author

Hi Massimo,

Thank you for your feedback.

Are there any other ways to accomplish it such as with rangesum function, or with any other functions?

I like the simplicity in your answer though.

Thank you again.

hic
Former Employee
Former Employee

If your ODBC (or OLEDB) driver supports this SQL syntax, you can write the SELECT just as you have done. QlikView's internal syntax (Load statements) does not allow this type of syntax, so you need to do it in two steps as maxgro suggests.

HIC

sinanozdemir
Specialist III
Specialist III
Author

Thank you so much Henric.