5 Replies Latest reply: Mar 3, 2013 9:16 AM by Jason Michaelides RSS

    How to obtain data from exact date

      I have an excel chart with dates and comments.

      I need to create a chart within QlikView to let me know which comments were done one week before or after the today date.

      Thanks!!

      B.

        • Re: How to obtain data from exact date
          Clarissa Buda

          I'm not sure if this would work with a text field, but for numeric fields, I use a lot of flags.

           

           

          So in your script,

          First define a variable to be equal to the max date

          then add this:

           

           

          InWeekToDate(YourDate,VariableofMaxDate,0) * -1 as CurWTDFlag

           

           

          This will assign a 0 to all records where the date is not within the current week and a 1 to those dates that are in the current week.

          Then in your expression you can multiple your field by the flag, returning 0 if the field is outside of the current week. 

           

          • Re: How to obtain data from exact date
            Clarissa Buda

            I'm not sure if this would work with a text field, but for numeric fields, I use a lot of flags.

             

             

            So in your script,

            First define a variable to be equal to the max date

            then add this:

             

             

            InWeekToDate(YourDate,VariableofMaxDate,0) * -1 as CurWTDFlag

             

             

            This will assign a 0 to all records where the date is not within the current week and a 1 to those dates that are in the current week.

            Then in your expression you can multiple your field by the flag, returning 0 if the field is outside of the current week. 

             

            • Re: How to obtain data from exact date

              sampleqlikview.jpg

               

              Hi! Many thanks for your rapid response, but i think i dont get it.

               

              Look, attached is my chart from QV, it contains data and comments, all, but I need to be cappable to filter those comments from last week, or last month (all in)....does it make sense to you??

               

              Regards,

              B.

              • Re: How to obtain data from exact date

                sampleqlikview.jpg

                 

                Hi! Many thanks for your rapid response, but i think i dont get it.

                 

                Look, attached is my chart from QV, it contains data and comments, all, but I need to be cappable to filter those comments from last week, or last month (all in)....does it make sense to you??

                 

                Regards,

                B.