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úl2 years, 10 months ago dgteamModerator
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.
If you only wanted from the 2nd to the 6th, you would add the mask criteria as ‘2020:01:01,2020:01:06’.
Does that help?
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.
Raul2 years, 10 months ago dgteamModerator
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.
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.
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.
Thanks! It worked with the second approach!
You must be logged in to reply to this topic.