Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

help with variable

Hello

I have the following and it works fine, just send me a variable to zero, I could support if well done telling my variable using RANGESUM

Temp:

Load sum(DATA) as totSales
Resident VentaOriginal
Where AGRUPADOR='01_VENTAS';


Let vTotSales = peek('totSales',0,'Temp');  --------->This variable is well,
Let vSales = Rangesum(totSales);  ---------> This variable just send zero.

Help me

5 Replies
Not applicable
Author

RangeSum cannot be applied this way in script. What is that you want to have in vSales variable?

Kiran.

Not applicable
Author

I want the sum of DATA, how could it get?

Not applicable
Author

I think thats what you are getting in vTotSales. How is this sum different from vTotSales?

Kiran.

Not applicable
Author

ok thanks, and you understood what I did was create a temporary table and create what I needed there.


Another thing as I do in my field acumudalo DATA. I put the following

Rangesum (peek ("ACUMULADO"), DATA) as ACUMULADO

but the moment in a pivot table compare this with data and accumulated option does not give me the same result.

Not applicable
Author

For accumulation I use numsum function. Please refer help on this: Interrecord functions -> Peek Function last example. Hope it helps you.

Kiran.