on 08-23-2010 4:39 PM
Hi,
Can anybody let me know how to go ahead and get a sum distinct for a particular measure object in a Universe?
If your database supports the syntax, you can simply use SUM(DISTINCT table.measure_column) and it should apply the distinct function. Note, however, that this can result in under-reporting certain values. For example, assume you have two sales orders with the same amount: $100. As long as you include the order number (or primary key order_id or otherwise) you will get a total of $200. But if you remove order number, the sum(distinct) will see two equal values (both $100) and your total will only be $100 instead of the correct answer $200.
What is the real problem you are trying to solve?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rajeev,
I did not get you, are you able to explain your question with some relevant example?
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.