Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 Help with mdx Statement, where on a calcul. Membra

Author  Topic 

Willex
Starting Member

1 Post

Posted - 2014-10-13 : 16:58:23
Hi all,
I'm quite new in writing Mdx queries. I created the following statement, which results in an error. I created a calculated member "HierLevel" which returns values for all Level on the Date.Calendar Hierarchy. But actually i want just the rows back that exists on Level 1,2 and 3.

Does anybody know how to achieve that

Thanks in advance

Alex
// my query

with member Measures.HierLevel as
[Date].[Calendar].currentmember.level.ordinal

select
{[Measures].[Internet Sales Amount], [Measures].[HierLevel]}
on Columns,
{[Product].[Product Categories].[Subcategory].members}
*
{[Date].[Calendar].Members}
on rows
from [Adventure Works]
where ([Measures].[HierLevel])=1 or
([Measures].[HierLevel])=2 or ([Measures].[HierLevel])=3
   

- Advertisement -