Previous Thread
Next Thread
Print Thread
Joined: Jun 2007
Posts: 964
S
Adagio Maestro
Adagio Maestro
S Offline
Joined: Jun 2007
Posts: 964
Here is a tough one for me.
I am hoping that perhaps someone has had to make this calculation & has figured this out.

GridView:

We are running a GV to select Customer Revenues/Sales from the Invoices module. (This of course is also relevant for other modules, such as SA or OE.)
Currently, we are using this statement to filter the records, which is working properly:

AND(
{Date} >= QUERYDATE("Start Date:", BeginMonth() ,0 ),
{Date} <= QUERYDATE("End Date:", BeginMonth() , 0)
)

The company fiscal year starts in Sep, so we might typically run the GV for Sep 2019-Jan 2020, for example.

Here is the question: We still want to prompt just one Start Date & End Date. But, we want to also display another column that will display the previous year revenues for the same date range, one year ago.
(We will summarize the GV by Customer to see just one record per Customer.)

Not sure if I should be doing this as a filter.
How do we call up all the records?


Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON
Joined: Mar 2002
Posts: 4,573
Adagio God
Adagio God
Joined: Mar 2002
Posts: 4,573
Hi Samuel

Of course it's me replying.

Give me a call and I'll show you the trick I use, which is not much different than the trick I showed you not too long ago.

It has to do with creating another view simply to do the date prompting, and then transferring the dates to the main view.

Steve

Joined: Aug 2011
Posts: 476
Joined: Aug 2011
Posts: 476
You'll want to store the date-values in their own view so that they can be easily referenced multiple times.

Encapsulate the current filter in an OR statement, with a second parameter added that mirrors the first but checks for the same value range minus 365 days from the start/end points:

OR ( 1st AND statement describing the desired time-frame , 2nd AND statement describing the time-frame subtracting 365 days from each value) .


Warren
Stief Group

Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 107 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,683
Posts71,655
Members1,875
Most Online1,408
Dec 9th, 2025
November
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Powered by UBB.threads™ PHP Forum Software 8.0.0