05-14-2019 7:10 PM - edited 02-04-2024 2:34 AM
Hello,
I have a tracelog report that has a start date and end date paremter. I want to use that report, but without the parameters and write a formula that shows the past 6 months data.. Then I want make a copy of the 6 moth report and make it an 8 month report then another copy to make it a past 12 month report.
I'm working with a Time_STAMP field since that is my only date driven field in the tables I have for my report. I figure I can add a SQL statement to this Data Formula to show past 6, 8 or 12 months data but I'm not sure how to do that. Thanks! 🙂
Date ({TR_BATCH.TIME_STAMP})
Hi Todd,
You'd need a Record Selection Formula like so:
1. Last 6 months:
Date ({TR_BATCH.TIME_STAMP}) IN [Date(DateAdd('m',-6,Minimum(monthtodate))) to Minimum(monthtodate)-1]
2. Last 8 months
Date ({TR_BATCH.TIME_STAMP}) IN [Date(DateAdd('m',-8,Minimum(monthtodate))) to Minimum(monthtodate)-1]
2. Last 12 months
Date ({TR_BATCH.TIME_STAMP}) IN [Date(DateAdd('m',-12,Minimum(monthtodate))) to Minimum(monthtodate)-1]
P.S: I have a feeling this may not get pushed down to the database as a where clause. In which case, it is better to use a SQL Expression for Start and End Dates.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.