Solved

How can I query MS DYNAMICS to view prior years sales

Posted on 2012-03-21
11
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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.
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part II
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

705 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