Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


SSAS Distinct Count Sum

SSAS Distinct Count Sum

SSAS Distinct Count Sum

I have a cube that has invoices in it.  Dimensions around the invoices are customers and item categories.  Our marketing area wants to get a count of distinct item categories purchased by each customer.  Then they want to take all the distinct counts at the customer level and sum them up and divide by the count of customers.

For example:

Customer A has purchased in 5 categories
Customer B has purchasedin 7 categories

The sum of the two customers distinct category count is 12.

Since there are 2 customers, the sum of 12 would be divided by 2 to get 6.

So the average item category per customer is 6.

My question is, how do I create this calculation?

I have the customer count and I have the item category count.  The problem is that that item category count is a distinct count and instead of being summed up, it continues to be a distinct count, so the highest it ever gets is 19 (since there are 19 categories).

So what I need to do is figure out how to sum the distinct counts.

Thanks in advance!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close