Solved

Sum of Distinct ID's not calculating as needed

Posted on 2008-06-11
2
927 Views
Last Modified: 2013-11-16
I have run across an issue that seems so simple but I cannot figure it out.  I have multiple rows from a detail table that consist of a number that I need to summarize. I only want to calculate one of the numbers from each ID but everything that I have tried either will not summarize the formula or it totals all rows.

RefID      Number
1731720      586
1731720      586
1731720      586
1731720      586
      
1731411      586
1731411      586
1731411      586
      
1732298      600
1732298      600
1732298      600

Total      5,902

The total that I am trying to get is 1,772 from the above example which consist of each ID and the number that goes with it.  I cannot do a distinct row because there are other columns within the  rows that do not have distinct values (TimeDate, Actions, etc)

The I cannot use distinct row counts because not all columns within the report are the same. How can I calculate this correctly?
0
Comment
Question by:aelliso3
[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
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 21761512
Use a RunningTotals field.

Sum the number field and use 'On change of field' set to the refid.
0
 
LVL 11

Author Closing Comment

by:aelliso3
ID: 31466209
Excellent ... That worked perfectly ...
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
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-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

689 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