Topic Options
#32987 - 08/23/12 08:50 AM Gridview Formula
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
I need a formula to calculate avg 2 months sales on each item.

If I were basing it last years sales, I would use:

{Sold LY}/6

But I also want to include this year sales:

{Sold YTD}/todays date minus April 1, 2012 divided by 2

Anyone know how to do this? It doesn't have to be exactly 2 months avg, just something close. Also, rounded to zero decimal places.
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#32988 - 08/23/12 11:42 AM Re: Gridview Formula [Re: SusanTennier]
Bruce Gardner Online   content
Adagio Wizard

Registered: 06/15/04
Posts: 3613
Loc: Toronto ON, Canada
Susan:
One way would be to break it down into sales per day and then multiply that figure by 60 days (or 60.8 using average days/month if you want to be particular).

-Number of days since April 1: Today() - Date(2012,3,31)
-Average sales per day: {Units Sold YTD} / [Number of Days]
-Sales for 2 months: [Average sales per day] * 60

The problem with this formula is that you have to edit it each April to change the calendar year. There's likely a way to work around that with some thought.
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#32989 - 08/23/12 11:51 AM Re: Gridview Formula [Re: SusanTennier]
Softrak Support Online   happy

Adagio Action Team

Registered: 03/09/99
Posts: 11547
Loc: Vancouver, BC Canada
Hi Susan,

So you would like to determine the dollar amount of sales for items over approximately 2 months, based on the 'Amount sold YTD' statistic? Is this correct? If not, then please indicate what type of calculation you are looking for.

If so, then you would have to determine what percentage of your fiscal year you are into (YTD is for the fiscal year), and multiply the amount by 61/365 (the percentage of the year for about 2 months worth of days). The FISCALSTART() function can determine the start date of your current fiscal year (as determined in the Edit/Defaults screen of GridView), and the YEARFRAC(start,end) function can determine the percentage between your fiscal start and TODAY().

YEARFRAC(FISCALSTART(),TODAY())

The formula for your 2 month sales, rounded to 0 decimal places:
ROUND( (61/365) * {Amt Sold YTD} / YEARFRAC( FISCALSTART() , TODAY() ) , 0)
_________________________
Regards,
Softrak Tech Support

Top
#33030 - 08/29/12 08:31 AM Re: Gridview Formula [Re: Softrak Support]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
This is working!!

ROUND( (61/365) * {Sold YTD} / YEARFRAC( FISCALSTART() , TODAY() ) , 0)

Yeah!

Now I need to add to this what was sold last year {Sold LY}.

So the result I'm getting so far is successfully showing me 2 months average qty sold based on this year-to-date qty sold.

I want it to show me 2 months average qty sold based on this year-to-date and last year qty sold combined.

Can you help?
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#33034 - 08/29/12 09:35 AM Re: Gridview Formula [Re: SusanTennier]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
Actually I just realized that the formula above that is working successfully, does not work when summarize is applied. Summarize adds all the combined lines together. frown

Added:

Nevermind, fixed this by selecting display average instead of display total. smile


Edited by SusanTennier (08/29/12 09:45 AM)
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#33038 - 08/29/12 10:55 AM Re: Gridview Formula [Re: SusanTennier]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
I would still like an answer to my question,

"So the result I'm getting so far is successfully showing me 2 months average qty sold based on this year-to-date qty sold.

I want it to show me 2 months average qty sold based on this year-to-date and last year qty sold combined.

Can you help?"
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top
#33042 - 08/29/12 12:38 PM Re: Gridview Formula [Re: SusanTennier]
SusanTennier Offline
Adagio Maestro

Registered: 02/22/08
Posts: 1247
Loc: Ontario, Canada
I figured out the rest so I'm good now.. thanks. I would have never figured this out without your help above.
_________________________
Susan Tennier
TDL Canada
Trenton, Ontario

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 236 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14465 Topics
70658 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
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