I have created a cube in SSAS: Measures: Income Dimension Time (Hierarchy: day-month-quarter-year) Dimension CustomerId
I need to create a report where: I will see Top10 and Bottom10 Customers by Income and there % of income from total. It should work at each level of hierarchy. I need to write an MDX in Visual Studio (not SQL Server) for each of the transformations. The issue is that visual studio differs from SQL server in terms of MDX format so I struggle to create a code that will work properly. This one perfectly works in SQL Server but doesn't work in SSAS:
Select [Measures] . [Income] on columns ,
TopCount ([Dim Customers].[Customer Id] . children,10 ) on rows
from [CUBE FINAL]
I tried to rewrite it:
TopCount([Dim Customers].[Customer Id].Members,10,[Measures].[Income])
Though it is processed normally, id doesn't work and gives me 'null' in report.
Where is the mistake? Thank you!!