Solved

How can I query MS DYNAMICS to view prior years sales

Posted on 2012-03-21
11
245 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now