I have a dimension [product].[type] having its member containing 'Food','Book','Metal','Meat', etc. My task is to show a categorized dimension to group my sales value, such as, group Food & Meat as 0, Metal & Tool as 1, Book as 2, etc..
My Query seems doesn't work:
WITH calculated member [Measures].[Grouped Type] AS
IIF([product].[type].CurrentMember IS [product].[type].[Meat], 0,
IIF([product].[type].CurrentMember IS [product].[type].[Food], 0,
IIF([product].[type].CurrentMember IS [product].[type].[Tool], 1,
...... , 9)))))
SELECT {[Measures].[Sales Amount], [Measures].[Grouped Type].Children} on 0
FROM Cube
WHERE ([Condition])
It looks my total sales amount is shown, but not correctly categorized. any help? Appreciated.