I want a measure that calcuates a Min/Max value for a data subset. e.g
ProductId SubCategoryId CategoryId UnitCost
1 1 A 10
2 1 B 15
3 2 A 20
4 1 B 5
So when i Analyse the cube I should get
Min Max
5 20
Categoryid Min Max
A 10 20
B 5 15
But When i go level deep
Categoryid SubCategoryId Min Max
A 1 10 10
A 2 20 20
B 1 5 15
Please let me know if this is possible using derived memebers or any other way that this can be achived. I am using Analysis server 2000.
Thanks
Pun
You could create 2 cube measures from the UnitCost field (like MinUnitCost and MaxUnitCost), using the standard Min and Max aggregate functions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olapdmad/agmeasures_0m0j.asp
>>
Using Aggregate Functions
This topic contains examples for using the aggregate functions (Sum, Min, Max, Count, and Distinct Count) in measures.
...
If a measure's Aggregate Function property value is Min, the measure value for a cube cell is calculated by taking the lowest value in the measure's source column from only the rows for the combination of members that defines the cell and the descendants of those members.
...
If a measure's Aggregate Function property value is Max, the measure value for a cube cell is calculated by taking the highest value in the measure's source column from only the rows for the combination of members that defines the cell and the descendants of those members.
...
>>
No comments:
Post a Comment