Query to include all dimensions on invoice line
njward
Member Posts: 38
Hello,
I'm looking at creating a query for invoice lines to include any dimensions. I can do this but most lines have more than one dimension so I get a new line for each one. Is there a way of displaying all dimensions on the same line as the main invoice line?
My intention is to publish this using Odata and use PowerPivot to extract the information into Excel for further analysis.
I'm new to this, so apologies if I have not explained this very well.
Thanks
Nick
I'm looking at creating a query for invoice lines to include any dimensions. I can do this but most lines have more than one dimension so I get a new line for each one. Is there a way of displaying all dimensions on the same line as the main invoice line?
My intention is to publish this using Odata and use PowerPivot to extract the information into Excel for further analysis.
I'm new to this, so apologies if I have not explained this very well.
Thanks
Nick
0
Answers
-
This type of SQL Server query is a dynamic cross tab query and can be handled by a complex stored procedure.
If you have a static number of dimension types you can use a case statement to parse the dimensions into separate columns. You could also do the same thing with a report - one dimension set per dimension type (department, project, and so on) - this way they would all appear on the same line.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Thanks David, It turned out that just needed one of dimension code so I used a filter in the query. Which as a good job as I'm still learning and it will take me a while to work out how to do stored procedures.
Nick0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions