Query for count distinct on a column in a measure group

Hi ,

I have two dimensions 

1 . customer, key for dimension is  customer_id ( value name: username)

2. Payment method , key for dimension is payment_id (value name: payment_method_name)

And i have a  deposits table which is a measure having:

customer_id, Payment_method_id,deposit_amt

 so i want to write a query which gives me total amount deposited and total number of unique customers?

Here is the example scenario

customer table:

customer_id username

1 Ram

2  Rahim

3 Robert

4 Razz

Payment table:

payement_method_id  payment_method

1 Visa

2  master_card

3   paypal

deposits table

customer_id payment_method_id deposit_amt

1  1   100

3    600

2  2  400

3  2    500

3  3    900

so the query must give me

number_of_unique_depositers total_amount_deposites

                3                                                          2500

please help me writing this query . I am new to writing MDX queries



May 22nd, 2014 5:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics