BookmarkSubscribeRSS Feed
hk2013
Fluorite | Level 6

i have a group of book seller and they have certain amount of books to sell by the end of year. We have already set monthly targets 

i want to get how many books they have to sell every week to get to get to the monthly target. Example:They have a target of 35% for jan how many books do they have to sell every week to reach that target. The weekly predict number should as more or less books are sold. if the sold less than their expected book than their next weeks number should be higher and if they sold more than expected than their next week number would be lower. 

data

 

NameIDTotal Booksunsold books sold books
JonJ5545642630
AdamJ7938635729
RobJ3452347647
TomJ9135033218
DustinJ2845042525
NancyJ4434332419

 

Target: 

MonthMonthly_target
january 35%
february50%
march62%
april71%
may78%
june84%
july88%
august92%
september94%
october96%
november98%
december100%

 

want:

NameIDTotal Booksunsold books sold booksweeks pred_sold 
JonJ55456426306-Jan….
JonJ554564263013-Jan….
JonJ554564263020-Jan
JonJ554564263027-Jan
JonJ55456426303-Feb 
JonJ554564263010-Feb 
JonJ554564263017-Feb 
JonJ554564263024-Feb 
2 REPLIES 2
Reeza
Super User
How is prep_sold calculated? What is the formula/logic to calculate the amount? I'm assuming this is cumulative as well, ie the 50% in February accounts for amounts sold in January as well? Sounds like you're trying to develop a 'how much should you sell' not an actual prediction of what would be sold? Otherwise if you miss a target for one month, wouldn't the 'more accurate' estimate be one that was lower than the previous value?
hk2013
Fluorite | Level 6
yes i am trying to figure out how much i should see to meet the monthly targets

pred_sold= (((Total_book*0.35)- ((Total_book)-unsold books)))/(number of week to end of month)
pred_sold = (((456*.35) - ((456)-426)))/(3weeks) = 43.2
and next week when i recalculated it will (only number that changes is the unsold books)
(((456*.35) - ((456)-400)))/(2weeks) = 51.8

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 613 views
  • 0 likes
  • 2 in conversation