Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum Values over other fields like "OVER PARTITION BY"

Hi,

I have this table on my dashboard that shows the sum of two values, it looks something like this:

id_client    datevl_1      datevl2      vl_1     vl_2

client_a     17-01-01     17-01-03     10          20

client_a     17-01-01     17-01-05     10          05

client_a     17-02-01     17-02-12     10          20

client_b     17-01-01     17-01-30     20          10

client_b     17-01-01     17-01-22     20          30

I need to show the sum in the final table like this:

filter: jan-17

id_client        vl_1     vl_2

client_a         10          25

client_b         20          40

total              30          65

filter: feb-17

id_client          vl_1     vl_2

client_a          10          20

total               10          20

I need to always sum the values of vl_2 but only one value of vl_1 per id_client and per date of vl_1

I don't know if i made myself clear enough but I need help.

Thank you.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi,

See Attachment.

Regards,

Antonio

View solution in original post

5 Replies
neelamsaroha157
Specialist II
Specialist II

try this

neelamsaroha157
Specialist II
Specialist II

You can achieve same through script as well

antoniotiman
Master III
Master III

Hi,

See Attachment.

Regards,

Antonio

Not applicable
Author

Thanks for the reply, that will sure help me.

Not applicable
Author

Thanks for the reply, I'll test it in my code and see wich one is better for all cases.