Qlik Community

QlikView Documents

Documents for QlikView related information.

Variables with Parameters

kkkumar82
Valued Contributor III

Variables with Parameters

Hi Qlikers,

I have been going through certain requirements in my current project which helped me to find variables with parameters.

Syntax:

if($1 = <value1>, expression1, if($1 = <value2>, expression2.......))))

Note : We can also use multiple parameters of different data types and can be referred with $1, $2.....,$n.

Steps  to create:

-> Create a variable in settings-> variable overview

-> Add a variable in the variable overview editor

-> In the definition area create if conditions with above syntax.

Usage:

->$(variablename(parameter 1, parameter2...parameter3...parametern))

PFA qvw file which contains a variable with a single parameter : The first value calculates Savings and the second value calculates Savings%.

Note: Although this feature is powerful , the variable editor shows "error"  or "underlines" in red which is a bug in Qlikview, please check the variable in a text box or in an expression for its validity.

Regards

Kiran Kumar

Tags (1)
Labels (1)
Attachments
Comments
Not applicable

Hi Kiran,

You solved my problem like that !!

Thanks

Kumar

beck_bakytbek
Honored Contributor

Great Topic, very informative

thanks for sharing

0 Likes
carbal1952
Contributor II

Mr. Kiran Kumar:


Very clever idea.

Many thanks.

Helps a lot.

CB.

0 Likes
punitpopli
Contributor III

Nice post, thanks for sharing

0 Likes
Not applicable

Great work.  I've been learning to use these better recently.  It's nice to compare to your QVW

0 Likes
lakshmikandh
Valued Contributor II

Hi Kiran,

Nice post,will this work on Qliksense ?

0 Likes
kkkumar82
Valued Contributor III

Hi Karthikeyan,

I have tested in Qlik Sense also, it is working fine there also. PFA sample which I created in Qliksense.

lakshmikandh
Valued Contributor II

Thanks Kiran

0 Likes
Not applicable

hi kiran, ur qvw file not open by my qlikview12. may be version diference. can you upload the script as word document if possible

0 Likes
kkkumar82
Valued Contributor III

Attached a word doc , let me know if your are able to do this.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2015-08-16 01:59 PM
Updated by: