Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Not applicable

Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Hi Sir

Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

May i know how to make it display 1259716.26 when i use sum(OPEN_STK) ?

Paul

1 Solution

Accepted Solutions
sunny_talwar
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Seems like you have duplicate rows of data

Capture.PNG

One way to fix this is to use DISTINCT (sum(DISTINCT STK_OPEN)), but that won't work if each row have different values. Ideally you should fix this in the script itself.

5 Replies
vikasmahajan
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

what you are trying to achieve ?

Vikas

sunny_talwar
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Seems like you have duplicate rows of data

Capture.PNG

One way to fix this is to use DISTINCT (sum(DISTINCT STK_OPEN)), but that won't work if each row have different values. Ideally you should fix this in the script itself.

paulyeo11
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Hi Sir

I try to compute avg stock , and now I got this problem , I cannot tell you what I want to achieve.

Sent from my iPhone

kush141087
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Capture.JPG

Please check the frequency of STOCK_OPEN is list box. It's showing 31.

I think you need to aggregate your data in Sales_table

p_verkooijen
Not applicable

Re: Why my raw data is 1259716.26 , but when i use sum(STK_OPEN) it display 30,051,204.06 ?

Paul please don't open new posts for the same issue.

I allready pointed out the fact that there are 31 value entries for dec in this post.

https://community.qlik.com/message/942162?et=watches.email.thread#942162

And it has been confirmed here again.

You should check your datamodel for duplicates or check the JOINs you use.