Mask dates by time range

DataGraph Forums Technical Support Support Desk Mask dates by time range

Tagged: , ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3097
    rvalenzuela
    Participant

      Hello,

      I was able to import a csv and define the time column as a date column. Now I need to mask the data to a certain time range (e.g. from June to August). Is there any way to do this?

      Raúl

      #3099
      dgteam
      Moderator

        To mask on a date range you use the “Lies Inside” option, with the mask criteria as the ‘begin,end’.  For dates the criteria is specified YYYY:MM:DD.

        For example, here is a data set with dates.

        Example1

        If you only wanted from the 2nd to the 6th, you would add the mask criteria as ‘2020:01:01,2020:01:06’.

        Example3

        Does that help?

        #3100
        rvalenzuela
        Participant

          Thanks!

          What if I need to select only a range of months? For example, data goes from 2000 to 2020, and I want to select only June, July, August months of the 2000-2020 period.

           

          Raul

          #3102
          dgteam
          Moderator

            There are a number of different approaches you could take depending on the format of your data and what you were trying to do.

            One way is to use a Logical mask type & combine that with the “month” function.

            For example, here there are two Logical criteria, where the month number must be greater than 1 and the second criteria is that the month number must be less then 3.

            Example4

            In this example, data with Month number = 2 (February) would be the only data allowed.

            Note when using a Logical mask the letter “v” represents the column you are using as the mask, in this case the column called “Date”.

            Another approach is to create a month column using an Expression column.

            The Expression uses the built-in ‘month’ function and the input is the name of the date column ‘YYYYMMDD’.  The function output is the month number in a column.

            Example5

            If you create a ‘month’ column, then you can use the ‘Lies Inside’ option for the mask.

            Let us know if either of these works for what you want to do.

            Another option could be to use the Pivot command, which can automatically group data by month # and has a quick way to mask based on the month number built-in.  If you’re are not sure, feel free to send a screenshot of your data/or something similar.

             

            #3103
            rvalenzuela
            Participant

              Thanks! It worked with the second approach!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.

            DataGraph Forums Technical Support Support Desk Mask dates by time range