Hey,
I have a file which contains date columns of both historical and forecast. My objective is to automate the process of selecting only the forecast (future) columns. For example: If I am running the workflow in Nov'17, the tool should select all the columns after and including Nov'17. Right now I am selecting the columns manually. Is there anything which can automate this?
Thanks!
Solved! Go to Solution.
@jdunkerley79 The idea is great. However, I want to select only the coming one year months. Can I do that? My file has coming 24 months fields. How can I select only the next 12 months. i.e Nov'17 - Oct'18
Note: The present month is to be included in the selection.
Thanks!!
Try:
[Name]>=Left(DateTimeTrim(DateTimeToday(), "Month"),10) AND [Name]<Left(DateTimeAdd(DateTimeTrim(DateTimeToday(), "Month"), 12, "Month"),10)
I think that should work
@jdunkerley79 this worked for date selection but it did not select the general fields like "Product Name" and "Product group". I would need that too apart from months. Thanks!
Can you drop a list of sample column names then I can tune for you.
This expression should only dynamically filter dates:
!REGEX_MATCH([Name],"\d{4}-\d{2}-\d{2}") OR ([Name]>=Left(DateTimeTrim(DateTimeToday(), "Month"),10) AND [Name]<Left(DateTimeAdd(DateTimeTrim(DateTimeToday(), "Month"), 12, "Month"),10))
Hopefully should work for you.
There is only one column "StockNo"