Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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

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.

View solution in original post

5 Replies
vikasmahajan

what you are trying to achieve ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

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
Master
Master
Author

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

Kushal_Chawda

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
Partner - Specialist
Partner - Specialist

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.