9 Replies Latest reply: Feb 23, 2011 5:35 PM by ajlwhite RSS

    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

       

        • Defining Variables

           

          Hello,

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

          Regards,

            • Defining Variables

              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

              • Defining Variables

                I downloaded the file from this post

                 

                The Basics about Dates, Date Ranges and Set Analysis

                 

                11-05-2010
                  • Defining Variables
                    John Witherspoon

                    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.

                      • Defining Variables

                        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?