cancel
Showing results for 
Search instead for 
Did you mean: 

Sum Distinct for a measure object

Former Member
0 Kudos

Hi,

Can anybody let me know how to go ahead and get a sum distinct for a particular measure object in a Universe?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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?

Answers (1)

Answers (1)

Former Member
0 Kudos

Rajeev,

I did not get you, are you able to explain your question with some relevant example?

Cheers.