The following is a simplified example of a real-world problem I'm facing: Let's say I have a Sales fact table with the Measure Count, with the dimensions Vendors, Customers, and Parts. I want to get the Min, Max, and Avg for the Sum of Sales Count for Parts, but constrained to the combinations of related Customers and Vendors.
Here's an example of the Sales table and Expected Results
Sales Table
+---------+-----------+-------------+-------+
| PartKey | VendorKey | CustomerKey | Count |
+---------+-----------+-------------+-------+
| 1 | a | Z | 10 |
| 1 | b | Z | 20 |
| 2 | a | Y | 30 |
| 2 | a | Y | 40 |
| 2 | b | Z | 50 |
+---------+-----------+-------------+-------+
Results
- PartKey 1 - Min: 10 (a,Z), Max: 20 (b,Z), Avg: 15
- PartKey 2 - Min: 50 (b,Z), Max: 70 (a,Y => 30 + 40), Avg: 60
So the measure I want to create somehow has to get the results from the data grouped by VendorKey, CustomerKey, and PartKey (though PartKey will be in the Filter Context), but I don't know how to specify that kind of grouping.