Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create a variable? in how many ways it is possible?

Hi,

i am new to qlikview. ans me please..

khadeer

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

See the Below Script

A:

LOAD * INLINE [

    item, rate

    coe, 0.23

    cog, 0.50

];

LOAD *

Resident A ;

LET vrate=Peek('rate',-1,'A');

here by default in edit script there is some variable with predefined save using Set command

you can see all the global variables under setting -->User Prefrence--->general

check on show system variable

ok  and see the all variables

in Script side use set and let variable

like

set vDate= 10-10-2013 ;

let sum = 4+ 5 ;

reload it

and in sheet object side

take text object

write

=vDate

then it gives Date because it works like string stateent

if write

=sum then it evaluate the answer is 9 in let statement on script side

but on dashboard side

you also make variable

press ctrl+alt+v

add variable

new

below write 4+5

then ok

in text object when write =new then it gives 4+5 works as a string

if again makes variable

new1

write

=4+5

use it in text obj

write

=new1

then gives 9 works as let statement

hope it helps

View solution in original post

6 Replies
israrkhan
Specialist II
Specialist II

there are many ways to create Variable, in script and in front end.

1) you can create it in script, Like Let a = 10. a is a variable having value 10.

2) you can create in document properties, sheet properties, there you will see variables , just click create new variable and give it a name.. and you can also create while creating new Calendar, Slider, if you right click on sheet>> and go to new object>> select Calendar/Slider. Here you will see new variable button as well..

Hope it Helps

Not applicable
Author

Hi Khadeer,

Check out this Attachement you will get the clear whole idea of What Variable is and How to use it.

hope it helps you

regards,

ravikant

qv_testing
Specialist II
Specialist II

In scripting level 2 types.

LET and SET

SET:  adding the string value to a variable

SET vResult='2+5'

returns 2+5

LEt: adding the expression result to a variable.

LET vResult=2+3

returns 5

Hope it Helps.....

er_mohit
Master II
Master II

See the Below Script

A:

LOAD * INLINE [

    item, rate

    coe, 0.23

    cog, 0.50

];

LOAD *

Resident A ;

LET vrate=Peek('rate',-1,'A');

here by default in edit script there is some variable with predefined save using Set command

you can see all the global variables under setting -->User Prefrence--->general

check on show system variable

ok  and see the all variables

in Script side use set and let variable

like

set vDate= 10-10-2013 ;

let sum = 4+ 5 ;

reload it

and in sheet object side

take text object

write

=vDate

then it gives Date because it works like string stateent

if write

=sum then it evaluate the answer is 9 in let statement on script side

but on dashboard side

you also make variable

press ctrl+alt+v

add variable

new

below write 4+5

then ok

in text object when write =new then it gives 4+5 works as a string

if again makes variable

new1

write

=4+5

use it in text obj

write

=new1

then gives 9 works as let statement

hope it helps

Not applicable
Author

Hi Ravikanth,

                  I tried to download attachment at many times,it is not opening file, can you please send me the pdf again.

Thanks

Khadeer

Not applicable
Author

hi,

check if it opens,

Regards,

Ravikant