Reporting question: include Friday, Saturday and Sunday for Create Date if Today's date is Monday

kemmy1
Tera Guru

Our client first requested a pretty common report of all SR's (under a certain item) that was created "yesterday." So I created a simple report and thought that was that.

But what they really want is a report of all SR's that were created "yesterday" but if it's Monday, have "yesterday" include not only Sunday, but Saturday and Friday as well. 

I'm thinking of creating a new field (text) and run a scheduled job to script out what is "yesterday", run it daily and put "yesterday" into this new field and report on that. (and of course blank out the already existing records with "yesterday" if it doesn't fit the bill anymore).

Is this the best solution?

Thanks!

Lisa

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

Don't create new fields.  If you use trend and relative operators correctly, you should be able to express this.  You just need to make it a whole other OR condition to the "created yesterday" line.  Don't click the OR at the end of the condition line.  Click the NEW CRITERIIA button at the bottom of the report builder!!

find_real_file.png

Anyway... this will make a whole new query condition that selects anything from three days ago so long as its also on a Friday, Saturday, Sunday, or Monday.

Knowing the Trend operator is critical for this kind of complexity.  I made a video about it here:

View solution in original post

11 REPLIES 11

christopherdenn
Kilo Explorer

I have not seen anyone post a solution yet so giving it a try.  I needed a report that on Monday would show just Saturday and Sunday (I could have included Friday but was not needed). Following is what works for me and will give credit for the foundation being provided by Robert Fedoruk but the results I was getting was blank. So, tweaked the concept a little and this produced the results I was looking for.  Sharing and would like to know if this helps/does it for anyone.

Let me know if it works for you?

find_real_file.png

ishi_agr
Kilo Contributor

Hi,

Thank you for the solution @Uncle Rob . I had the same problem, though your solution didnt work as it is but a little fine tuning helped me get what I need.

 

Here's how you can include cases where: IF day=Tue-Fri THEN case created date=yesterday ELSE IF Day=Mon then Case created date = Fri-Mon

ishi_agr_1-1665437712479.png

Hope it helps!

Thanks