Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating variables in qlikview

HI,

How to create variable in qlikview? I want to create a report in which I want to pass time fields(to & from) as input variables.

Please guide me on this.

Thank you

11 Replies
laujerry
Creator
Creator

Settings > Variable Overview

do u mean this?

techvarun
Specialist II
Specialist II

Settings -------> Variable Overview --------------> Add

techvarun
Specialist II
Specialist II

From and  to Date?


Then this is the easiest example Easy Date Range Selection with Qlikview | Min-Maxing

Not applicable
Author

Hi Shweta,

You can create variables in qlikview using following steps:

1. Go to Settings then Variable Overview

Variable_Overview.bmp

2. Once you click on variable overview

Variable_Overview2.bmp

Click on Add and then you can add a name for the variable and value.

Hope this answers your first question.

For the second question, can you elaborate a little more?


Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

I hope you understand what Variable is and How it work.

Variable is STORED EXPRESSION, i.e vTotal = Sum(Sales)

Few place you can declare your variable are:

1- Go to Settings -> Variable -> Click ADD and declare your variable then Select the variable and assign expression to it as in vTotal and then Select vTotal, from the expression definition enter =Sum(Sales) or whatever your definition is.

2- Variable can also be use in the Script, you can declare variable in the script as this LET vDate = Today().

To do this, Select ctrl + E, after the last LET press RETURN and enter LET vDate = Today() or whatever your expression is.

The benefit of variable is, it help with expression maintenance in one place and this helps with expression re-usability.

Hope this helps

Best Regards,

Gabriel

Not applicable
Author

hi Shyamal Pandit

Thanks for help. I am creating a report from 'Reports' menu for which I need user selectable dates. For ex. If i want to see values for a period of 1.08.2013 to 30.08.2013 then I want these two dates as inputs from user.

I hope this gives you more clarity.

Not applicable
Author

Thank you all for help

Not applicable
Author

vvvvvvizard
Partner - Specialist
Partner - Specialist

CRT+AVL+V

aDD VARIABLE Name eg Cost

add variable expression in the definition field

reference the variable in a chart expression eg with $(Cost)