4 Replies Latest reply: Feb 28, 2012 2:28 PM by Federico Levi RSS

    Date range slider (print-screen attached)

      I'm having an issue with my date range slider.

       

      As you can see in the image attached, the slider on the top is holding values for each date row, 8/11 is listed 4 times, 9/11 is listed 4 times, 11/11 is listed 4 times, 12/11, ect.

       

      How can I clean up my slider?

       

      It's pulling from a "PeriodEnd" field, and will be used to create statements of work.

       

      The PeriodEnd field contains a date value, and within the slider I changed the numbering to just show MM/YY.

       

      Thanks!

      Arb

        • Date range slider (print-screen attached)

          Also, from my PeriodEnd field, can I create objects for year, quarter, month, and day?

           

          As you can see in my print screen, I have filters built that I would like to be able to filter by.

           

          My PeriodEnd field contains a date string such as "03/19/1995", can I seperate those values?

            • Date range slider (print-screen attached)

              Here is a Master Calendar you can use (or at least the expressions)

              You need create the variables varMaxDate and varMinDate

               

              By any chance are you using hours/minutes in your dates? Becasuse QV represents differently a same date with 2 different hours.

               

               

               

               

              TempCalendar:

              LOAD

                        $(varMinDate) + rowno() - 1 AS Num,

                        date($(varMinDate) + rowno() - 1) AS TempDate

              AUTOGENERATE

                        $(varMaxDate) - $(varMinDate) + 1;

               

               

               

               

              //*************** Master Calendar ***************

              MasterCalendar:

              LOAD                    TempDate AS PeriodEnd ,

                                  Week(TempDate) AS Week,

                                  Year(TempDate) AS Year,

                                  Month(TempDate) AS Month,

                                  Day(TempDate) AS Day,

                                  Weekday(TempDate) AS WeekDay,

                                  'Q' & ceil(month(TempDate) / 3) AS Quarter,

                                  Date(monthstart(TempDate), 'MMM-YYYY') AS

                                            MonthYear,

                                  Week(TempDate)&'-'&Year(TempDate) AS WeekYear,

                                  inyeartodate(TempDate, $(vToday), 0) * -1 AS

                                            CurYTDFlag,

                                  inyeartodate(TempDate, $(vToday), -1) * -1 AS

                                            LastYTDFlag

              RESIDENT TempCalendar

              ORDER BY TempDate ASC;

               

               

              DROP TABLE TempCalendar;

                • Date range slider (print-screen attached)

                  Thanks a lot for your response. I'm kind of novice, so I don't really know what to do with the tempcalendar or master calendar, or how to create the variables varMaxDate and varMinDate.

                   

                  There is a timestamp, but it's the same on every line. It shows me 12:00:00 AM, this isn't preset, I think it's being added by QlikView, and I'm removing it with the numbering tab.

                    • Date range slider (print-screen attached)

                      A good use for a master calendar is when your date doesnt necesary has every date in a year and you want to represent a calenar with list tables. Here you ensure that you will get 1 to 31 in days and January to December in months. Also, every date will correspond to a month, year, quarter, week, weekday, etc.

                      varMaxDate and varMinDate is for the range of your calendar. Normally you peek for the min and max date of your data.

                       

                      About the repetition of dates, could you upload your qvw to take a look?