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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Integer variable in Qlikview

Hi,

How can I declare an integer variable in my script Qlikview and use this variable in a text object.

Thanks.

15 Replies
villafuerte
Partner Ambassador
Partner Ambassador

SET X= 45;

OR

LET X= 5*2; (this one will evaluate > 5*2=10)

Cheers

Not applicable
Author

Now, how to use this variable in a TEXT OBJECT.

Not applicable
Author

=myvariable

or

=$(myvariable)

Not applicable
Author

Hi,

look at the example file.

I created a integer variable and a string variable.

The string ist then presented in a text box!

Cheers

Martin

oscar_ortiz
Partner - Specialist
Partner - Specialist

In your script create your variable, something like this:

Let vText = 'Hello World';

In your Text Object create an expression to evaluate your variable:

=vText

Your Text Object should show "Hello World"

Not applicable
Author

I have done like this in my script:

LET nbMois = round((Date(DateFinExercice, $(DateFormat) )-Date(DateDebutExercice, $(DateFormat) ))/30);

and in the TEXT object, i have done

= nbMois and = $(nbMois) it did not work

Not applicable
Author

Please Martin, write your script in the message. My Qlikview version can't open your file.

I use Qlikview Personal Edition

Not applicable
Author

Oscar escuse me, i told of INTEGER Variable not Text Variable.

oscar_ortiz
Partner - Specialist
Partner - Specialist

Works the same way with integer:

Let vInteger = 45;

In your Text Object create an expression to evaluate your variable:

=vInteger

Your Text Object should show "45"