Hello, I'm trying to run my report weekly and i want the dates to only pick from the last run date.
I have a formula in there that runs the report from the 1st of the month, but when i run the report i need the report to only pick up the report from the last time i ran it. Would this possible?
Hey @ntudev are you able to share a few more details about how you bring in the report etc? I'm guessing you save all of your runs somewhere and then currently use a Dynamic Input tool for the one which ran at the start of the month?
If you use a Directory > Dynamic Input combination then you could just add a sort after the Directory tool, descending on CreationTime and then a sample tool to only keep the First N rows (N = 1).
Something like this:
Hi @ntudev
Some more info would be helpful. I'm interpreting it a bit different than @DataNath. If you need to filter from the last time you ran the WF, you probably need to output a yxdb file with a date time field (created using the datetimenow() function). Then bring that in as an input to leverage in your filter.
Hey @ntudev, from the example you’ve provided, it looks like you could just use a Filter tool with the expression:
DateTimeParse([Cmmt Entered Date], ‘%d/%m/%Y’) > DateTimeParse([Report Run Date], ‘%d/%m/%Y’)
The data you want will come out of the top (true anchor).
its giving me an error, am i inputting wrong
Oh sorry, I opened it in Excel originally so the date formatting was different. You don't actually need the DateTimeParse() functions, can just use: [Cmmt Entered Date]>[Report Run Date]
However, that's also incorrect as it's comparing it to the date of the same run (i.e. that dataset), rather than the previous. You could pull in the previous by doing something to the dynamic input I mentioned earlier, trimming down your previous run input so you only have the date ran field and then append that to the new run, before applying this formula. If you can provide an example of a new run and a previous I can build something for you.
wow this is way more complicated then i thought.