Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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
Honored Contributor III

Re: Sum Values over other fields like "OVER PARTITION BY"

Hi,

See Attachment.

Regards,

Antonio

View solution in original post

5 Replies
neelamsaroha157
Valued Contributor II

Re: Sum Values over other fields like "OVER PARTITION BY"

try this

neelamsaroha157
Valued Contributor II

Re: Sum Values over other fields like "OVER PARTITION BY"

You can achieve same through script as well

antoniotiman
Honored Contributor III

Re: Sum Values over other fields like "OVER PARTITION BY"

Hi,

See Attachment.

Regards,

Antonio

View solution in original post

Not applicable

Re: Sum Values over other fields like "OVER PARTITION BY"

Thanks for the reply, that will sure help me.

Not applicable

Re: Sum Values over other fields like "OVER PARTITION BY"

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