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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run part of the code with variable control

I have a dimensions and facts.
I don't want to execute the dim's part (create qvd for each dim) every interval, only every 3 intervals.
so my idea was to create a counter variable (if variable >3 run the dim's part).
any advise how to do that?

is it possible to pass variable from management console?

Labels (1)
3 Replies
marcus_sommer
MVP
MVP

You could use something like this directly or outsourced as include-variable:

if $(vIntervalCounter) < 3 then

     let vIntervalCounter = $(vIntervalCounter) + 1;

     exit script;

else

     let vIntervalCounter = 0;

end if

....

// Your Load-Statements

- Marcus

Not applicable
Author

Thanks,
what is the best source to use for save the variable?

is it possible to pass variable from management console?

marcus_sommer
MVP
MVP

I'm not sure but I believe you couldn't pass such variables from the qmc - maybe the publisher had here more options. But you could generate such variable externally and store it in a textfile which could be load as include-variable and then use a logic similar to the above mentioned.

- Marcus