Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

markgraham123
Contributor II

Sum() operation is returning total sum by default

Hi Everyone,

I'm working on an application, where when i select SKU#, it should show the Warehouse in the chart table and individual sum.

In the end, i have to see the total.

But the total sum is getting populated in all the Sum() fields rather than its own individual sum() values.

PLease look into this.

Tags (2)
9 Replies
sorrakis01
Valued Contributor

Re: Sum() operation is returning total sum by default

Hi,

In expression  write Sum(Aggr(Sum([Qty on Hand]),[ID Warehouse]))

Regards,

markgraham123
Contributor II

Re: Sum() operation is returning total sum by default

HI,

The expr. is returning zero values.

sorrakis01
Valued Contributor

Re: Sum() operation is returning total sum by default

Hi,

See the example.

Regards

markgraham123
Contributor II

Re: Sum() operation is returning total sum by default

HI,

Please find the app. with updated data..

its not working in the below app.

sorry for inconvenience.

sorrakis01
Valued Contributor

Re: Sum() operation is returning total sum by default

Hi Mark,

For understand your problem... your problem exactly is on Total of Simple Chart? now its correctly. In your first example only sums distinct values. And now sum all values.


Maybe the problem it's on your values because you have a Qty 44 on a null dimension.


For understand, where is your problem exactly?


if you prefer you can upload Book1.xls


Thanks

markgraham123
Contributor II

Re: Sum() operation is returning total sum by default

I want to sum only distinct values but not total values....

sorrakis01
Valued Contributor

Re: Sum() operation is returning total sum by default

Hi,

ok and this?

Sum(DISTINCT Aggr(Sum([Qty on Hand]),[ID Warehouse]))

markgraham123
Contributor II

Re: Sum() operation is returning total sum by default

Hi,

it still shows the total .

awhitfield
Esteemed Contributor

Re: Sum() operation is returning total sum by default

Hi Mark,

Should the dimension be Skort_Warehouse  and expression just sum(qty on hand)

HTH - Andy

Community Browser