[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

03/02/2005 at 12:15PM PST, ID: 21335303
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Sum in Group by not working correctly

Asked by leonstryker in Databases Miscellaneous

Tags: correctly, excel, group, select, sum

I am running this query:

strSQL = "SELECT a.Book, a.Product, a.Maturity, " & _
                 "SUM(a.[Endure Positions]), SUM(a.[Sierra Position]), '=RC[-2]-RC[-1]', '', " & _
                 "SUM(a.[Endure PL]), SUM(a.[Sierra PL]), '=RC[-2]-RC[-1]', " & _
                 "'=IF(ISERROR(RC[6]-RC[11]), 0,RC[6]-RC[11])', '=RC[-1]-RC[-2]', " & _
                 "'', b.Price, c.[End Price], '=RC[-2]-RC[-1]', '=RC[-1]*RC[-12]*VLOOKUP(RC2,rngSierraMultplier,3,FALSE)', " & _
                 "'', '', '', '', d.[PL Impact]" & _
                "FROM [futures$] a, [EndureIndexPrices$] b, [Sierra$] c,  [Prior Adj$] d " & _
                "WHERE a.Product = b.[Sierra Index] AND a.Maturity = b.Contract " & _
                "AND a.Product = c.Product AND a.Maturity = c.Maturity AND c.Instrum = 'Future' " & _
                "AND a.Product = d.Asset AND a.Maturity = UCASE(d.Contract) AND a.Book = d.Book " & _
                "GROUP BY a.Book, a.Product, a.Maturity, b.Price, c.[End Price], d.[PL Impact]"

The source is an Excel workbook and the result is placed into another Excel wokbook.  For some reason the values for the fields summed are multiplied by the number of records added together.  For example if a particular item has 4 entries which should sum to 400, we get a return of 1600.  I almost want to divide each SUM by  a COUNT, but i would like to know why this is happening in the first place.  
[+][-]03/02/05 12:54 PM, ID: 13443910

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Databases Miscellaneous
Tags: correctly, excel, group, select, sum
Sign Up Now!
Solution Provided By: jrb1
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03/02/05 12:57 PM, ID: 13443950

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 01:13 PM, ID: 13444135

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 01:23 PM, ID: 13444240

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 01:26 PM, ID: 13444280

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 01:32 PM, ID: 13444328

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 01:39 PM, ID: 13444407

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 01:47 PM, ID: 13444497

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 02:03 PM, ID: 13444640

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 02:05 PM, ID: 13444653

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 02:17 PM, ID: 13444755

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 02:27 PM, ID: 13444839

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 02:32 PM, ID: 13444881

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/05 02:49 PM, ID: 13445022

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/05 06:23 PM, ID: 13446184

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/03/05 07:56 AM, ID: 13450560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/03/05 09:56 AM, ID: 13451835

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/03/05 10:01 AM, ID: 13451891

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/05 06:47 AM, ID: 13459268

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/05 06:50 AM, ID: 13459285

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/05 07:02 AM, ID: 13459386

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/05 07:38 AM, ID: 13459674

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/05 07:41 AM, ID: 13459698

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/05 08:24 AM, ID: 13460114

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/05 10:16 AM, ID: 13461099

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74