Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Creating buckets by comparing Dimension member against Measure using MDX

$
0
0
I have a Product dimension which has hierarchies - product_id, initial_price, product_name and Measures - units_sold, cost_per_unit, revenue_per_unit. For each product_id I need to compare initial_price against revenue_per_unit and then assign it to a bucket based on the comparison.


Consider the following example:
Input:
product_id initial_price revenue_per_unit
1 10 12
2 20 18
3 30 30


Output:
product_id bucket_name
1 Profit
2 Loss
3 Same


How can I achieve this using MDX?

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>