ssasmdxcubeolap-cube

Can you create text based calculated members in SSAS


Is is possible to have a calculated member that shows text instead of numerical values.For instance, classifying customers by the product they bought into Platinum, gold, silver and bronze.
enter image description here

Is it possible to aggregate the data and show it in the cube in this way?


Solution

  • Since you have a Multidimensional cube you write the calculated measures in MDX. You can use the Case function to build a calculation like this which returns text:

    CREATE MEMBER CURRENTCUBE.[Measures].[Classification]
    AS
    Case
     When [Measures].[Volume] >= 1  And [Measures].[Volume] < 6 Then "Bronze"
     When [Measures].[Volume] >= 6  And [Measures].[Volume] < 11 Then "Silver"
     When [Measures].[Volume] >= 11 And [Measures].[Volume] <= 15 Then "Gold"
     When [Measures].[Volume] >  15 Then "Platinum"
    End;