Solved

How can I query MS DYNAMICS to view prior years sales

Posted on 2012-03-21
11
244 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
Comment Utility
Which Dynamics product are you using?
0
 

Author Comment

by:manelson05
Comment Utility
Dynamics 10
Mfg, Finanicials and project actg
0
 

Author Comment

by:manelson05
Comment Utility
Dynamics GP
0
 
LVL 18

Expert Comment

by:Victoria Yudin
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:manelson05
Comment Utility
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
Comment Utility
I am trying to come up with total sales dollars not quantities.
0
 

Author Comment

by:manelson05
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Excellent, this proved to be very helpful.

Thank you very much!


Mark
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

12 Experts available now in Live!

Get 1:1 Help Now