-
MDX help! How to group by measure value ranges and use these groups in columns
I have a salesman dimension and sales fact table and some data as below:
salesman sales_amount
-----------------------------
Mike $200
Phil $5
John $280
Jessica $550
I'd like MDX query result as below:
sales_range Count
-------------------------
<$100 1
$100-$500 2
>$500 1
The sales_range (<$100, $100-$500 and >$500) are fixed and hard-coded and never needed to be changed. And I can do dimension/fact table or cube changes for this if needed.
Please help! How to write MDX query for this?
Any input will be highly appreciated! Thanks!
Last edited by haskell; 05-21-2009 at 02:09 PM.
Reason: add more information to make it clearer
-
Ideas ...
While there are numerous approaches, a "quick and dirty" might be to create a calculated member for each of the "value buckets" you itemize, and then to run a query to "count," versus sum them, juxtaposed against the sales people in the row axis, etc.
Let me know if I can assist / suggest further. If you need a working example, we can try, between us, to render one via the Adventure Works sample.
HTH,
Bill
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|