Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can I declare an integer variable in my script Qlikview and use this variable in a text object.
Thanks.
Now, i have done like this,
LET nbMois = 45;
LET nbMois = round((Date(DateFinExercice, $(DateFormat) )-Date(DateDebutExercice, $(DateFormat) ))/30);
in text objet, i done:
= nbMois
but i have not a result
Your problem may lay in your formula:
Comment out your formula just to verify that placing a 45 in your variable will actually work for you.
LET nbMois = 45;
//LET nbMois = round((Date(DateFinExercice, $(DateFormat) )-Date(DateDebutExercice, $(DateFormat) ))/30);
If the 45 displays fine for you, you'll have to check your formula.
when i done as you, 45 displays fine.
Also, when i put this expression
= round((Date(DateFinExercice, $(DateFormat) )-Date(DateDebutExercice, $(DateFormat) ))/30);
in my text object, the good result displays 12
As i use this formula in many sheet, i would like to create a global variable.
Try this:
create a variable with your formula:
SET vFormula=round((Date(DateFinExercice, $(DateFormat) )-Date(DateDebutExercice, $(DateFormat) ))/30);
and use it later on like:
=$(vFormula)
Cheers
Martin
Thank you very much Martin
It works perfectly.
Can i have ur email adress.
This is mine : yimengael@yahoo.com
Hi,
can you please verify the answer?
THX.
Why do you need my E-Mail?
Martin