Solved

How can I query MS DYNAMICS to view prior years sales

Posted on 2012-03-21
11
250 Views
Last Modified: 2012-04-13
I am trying to determine 2010&2011sales numbers. I would also like to see by type commercial or non commercial items with totals.
0
Comment
Question by:manelson05
  • 7
  • 4
11 Comments
 
LVL 18

Expert Comment

by:Victoria Yudin
ID: 37750607
Which Dynamics product are you using?
0
 

Author Comment

by:manelson05
ID: 37750648
Dynamics 10
Mfg, Finanicials and project actg
0
 

Author Comment

by:manelson05
ID: 37750793
Dynamics GP
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 18

Expert Comment

by:Victoria Yudin
ID: 37751847
There is no one answer to your question, as there are a lot of different ways to enter 'sales' data into GP.  Also 'commercial' and 'non-commercial' are not GP terms, so you would need to identify what determines this in your data to be able to segregate your results this way.  

All that said, I have a bunch of different views posted on my blog that may help you either get the data you are looking for or at the very least give you some starting points:

SOP (Sales Order Processing) views: http://victoriayudin.com/gp-reports/sop-sql-views/

If this is not what you're looking for, or you need some more help, can you please provide more detail as to which modules in GP you are using to record sales and what exactly you want to report on?
0
 

Author Comment

by:manelson05
ID: 37752392
I am trying to determine total sales for the years 2010 and 2011 based on SOPNUMBE that start with CM and MM. All commerical SOPNUMBE begin with CM and all MIL start with MM
0
 

Author Comment

by:manelson05
ID: 37752542
We are using SOP and Inventory. I am wanting to see total sales for the two years.
I looked in SQL and did discover the SOPNUMBE defining MIL and Commercial sales as MM and CM.

Does this help you at all?
0
 

Author Comment

by:manelson05
ID: 37752632
I am trying to come up with total sales dollars not quantities.
0
 

Author Comment

by:manelson05
ID: 37752671
Is it possible to use INVOICe for yearly totals to get the total dollars sold that year?
0
 
LVL 18

Expert Comment

by:Victoria Yudin
ID: 37752730
How about something like this:

select year(DOCDATE) Sale_Year, left(SOPNUMBE,2) Sale_Type,  
sum(SUBTOTAL) Sales_Amt
from SOP30200 
where VOIDSTTS = 0 and year(DOCDATE) in (2010,2011) 
and left(SOPNUMBE,2) in ('MM', 'CM')
group by year(DOCDATE), left(SOPNUMBE,2)

Open in new window

0
 
LVL 18

Accepted Solution

by:
Victoria Yudin earned 500 total points
ID: 37752752
PS - that is assuming that only invoices start with MM and CM.  If that is not the case, you can either restrict on invoices only by adding the following before the last line:
and SOPTYPE = 3

Open in new window


or you need to do something more complicated, for example if you want to subtract returns.  Let me know if that is the case and I will help with that code if you need.
0
 

Author Closing Comment

by:manelson05
ID: 37845105
Excellent, this proved to be very helpful.

Thank you very much!


Mark
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question