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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to store and retrieve Constant values in variable?

Hello,

The scenario goes this way, 'ID' is my Primary key field, Suppose Count(ID)=10 (Previous Week Monday).

I reload the data today after changes in source, Count(ID)=15 (This week Monday)..

I want to add a text object as 'Vs Previous Week' which will Show '+5'

I want to Store the previous reload count in a variable, retrieve it and Subtract it from current reload count.

There is no other column to calculate it.

Please help.Thanks in Advance.

Regards,

Pratik

2 Replies
marcus_sommer

If you have a date-field which is linked to your Key "ID" you didn't need this approach - you could it calculate directly over the date-field. If not I would store these count by every reload in a qvd with an additional field like today() as ReloadDate.

- Marcus

Not applicable
Author

Create 2 variables vZ and vY

Try with this code in the script

vZ = $(vY)

vY = $(vY) + 10;//Just a test value:)

Look out of the values vZ and vY in the text Box.

-Ram