Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Wrong Cumul value with peek

Hi Folks,

i am trying to use the peek()-function to create the cumul. value, but i get wrong results, i am using this expression:

RangeSum(value,Peek(CumulativeSum)) as CumulativeSum. but i still have the wrong results, my expected output is Column: CumulValue

My Table does look like:

Year Month Day Material Index_ID quantity price Value CumulValue
2021 Jan 1 A1 12 2 100 200 200
2021 Feb 2 A1 15 2 55 110 310
2021 Mar 3 A1 13 3 12 36 346
2022 Jan 1 A1 12 4 10 40 386
2022 Feb 2 A1 45 4 10 40 426
2022 Mar 3 A1 12 2 10 20 446

 

Does anybody have any idea how to resolve this issue?

Thanks a lot 

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Chart Expression

rangesumabovesum(Value),0,rowno()) )

 

Script field

RangeSum(value,Peek('CumulativeSum')) as CumulativeSum  // missing single quotes, fields need to be passed as string

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
MarcoWedel

What are those wrong results?

vinieme12
Champion III
Champion III

Chart Expression

rangesumabovesum(Value),0,rowno()) )

 

Script field

RangeSum(value,Peek('CumulativeSum')) as CumulativeSum  // missing single quotes, fields need to be passed as string

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
beck_bakytbek
Master
Master
Author

Hi Marco, i had normal numbers, not cumulated. Now I have solved it,
I just forgot the single quotes. Thanks for your time and help

beck_bakytbek
Master
Master
Author

Hi Vineeth, thank you very much for time and help