Previous Thread
Next Thread
Print Thread
#32987 08/23/12 01:50 PM
Joined: Feb 2008
Posts: 1,247
Adagio Maestro
Adagio Maestro
Joined: Feb 2008
Posts: 1,247
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
Joined: Jun 2004
Posts: 3,692
B
Adagio Wizard
Adagio Wizard
B Offline
Joined: Jun 2004
Posts: 3,692
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.

Joined: Mar 1999
Posts: 11,746
Adagio Action Team
Adagio Action Team
Joined: Mar 1999
Posts: 11,746
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
Joined: Feb 2008
Posts: 1,247
Adagio Maestro
Adagio Maestro
Joined: Feb 2008
Posts: 1,247
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
Joined: Feb 2008
Posts: 1,247
Adagio Maestro
Adagio Maestro
Joined: Feb 2008
Posts: 1,247
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

Last edited by SusanTennier; 08/29/12 02:45 PM.

Susan Tennier
TDL Canada
Trenton, Ontario
Joined: Feb 2008
Posts: 1,247
Adagio Maestro
Adagio Maestro
Joined: Feb 2008
Posts: 1,247
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
Joined: Feb 2008
Posts: 1,247
Adagio Maestro
Adagio Maestro
Joined: Feb 2008
Posts: 1,247
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

Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 136 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,679
Posts71,625
Members1,874
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