Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Defining Variables

I am still new to Qikview - I am looking at an example from this forum

4 variables are defined in the script but on the objects there are 4 more variables available

vStartdate, VEndDate are 2 of them

They seem to derive their values from a calendar input object , as i change the dte in the calendar object the value of the variable changes

- but how do I define the variable??

i.e.vStartDate = entered date in calendar object

where in Qlikview doI define these variables and where do i find their definitions - i caan only see the value not how it is derived

sorry - this is probably a really simple question but i am stumped

thanks

9 Replies
Not applicable
Author

Hello,

You can see the definition under Settings menu --> Variable Overview option.

Regards,

Not applicable
Author

Thanks so much for the quick reply - my problem is i can't?

in the variable overview box it lists the variables in variables but when i click on one - it just shows me 39542

if i pick a new date in the calendar object - this value changes - but I can't seem to access how the value is calculated

Not applicable
Author

I downloaded the file from this post

The Basics about Dates, Date Ranges and Set Analysis

11-05-2010
johnw
Champion III
Champion III

I'm not sure what you mean by "how it is derived". The calendar input object is almost certainly the way these variables are entered.

You can see variable definitions here:

Settings -> Document Properties -> Variables

Internally, dates are stored as the number of days since December 30, 1899. The date you're looking at is 39542 days since December 30, 1899, which is April 4, 2008. Not sure why the variable overviews aren't smart enough to format it. I suppose because there appears to be no direct way to tell QlikView that it's a date, but only ways to tell it "I want to enter this number using a calendar object". Functionally it's a date then, but parts of QlikView apparently remain unaware that that's how you're using it.

Not applicable
Author

What kind of object is your Calendar object?

It's possible that the variable could be being created from a macro. Can you upload your example for review that?

Not applicable
Author

Thanks so much for the quick reply - I downloaded the file in the previous post

The Basics about Dates, Date Ranges and Set Analysis

The calendar object SL01 Start date - under Properties / General / Data uses the variable VStartDate from a drop down list - If you look at the list

vMinDate,vMaxdate,vYearMax and vYearMin are defined in the script

but where are vStartDate, vEndDate, vYear1 and vYear2 defined? they appear in the drop down list?

am I being really stupid?

Not applicable
Author

The Basics about Dates, Date Ranges and Set Analysis

I downloaded the file from here on the forum


johnw
Champion III
Champion III


ajlwhite wrote:where are vStartDate, vEndDate, vYear1 and vYear2 defined?


Settings -> Document Properties -> Variables

Not applicable
Author

I am being dumb - I have it now - thanks for your patience

it seems simple - you just define a variable and let the slider object populate