Reputation: 153
I have searched different MDX resources and read a lot of materail about MDX selects and filters. I have this SQL Query that I have to restructure in MDX:
Select Left (hcc_key, 2) as Rayon
From [alias_dat].[dbo].[tbl_dim_responsible]
where usr_name=('John Doe')
How do i select a name field from a table in MDX using the Left Function?
I understand that MDX is completely different to SQL and thus can't completely be translated. If someone could help me get a step further, i would be very grateful.
Upvotes: 0
Views: 932
Reputation: 464
Try this one:
With
Member [Measures].[Rayon] As Left([Dimension].[Hierarchy].CurrentMember.Name, 2)
Select
{[Measures].[Rayon]} On Columns,
{[Dimension].[Hierarchy].[Level].Members} On Rows
From [Your Cube]
Upvotes: 1