ssas - MDX query with multiple filters using OR -


i have following mdx query have been asked extend:

    select {} on columns, crossjoin(     [waterbody].[waterbody code].[waterbody code],     [waterbody].[waterbody name].[waterbody name],     [waterbody].[waterbody type].[waterbody type],     filter([waterbody].[waterbody full name].allmembers,instr([waterbody].[waterbody full name].currentmember.member_caption,'test waterbody name')>0)     )  on rows [waterbody data] 

there column called "waterbody name" , need return rows the given value in either "waterbody full name" or "waterbody name".

i'm handy enough @ sql mdx stuff new me. spent large part of yesterday trying different things got nowhere. i'd appreciate help.

thanks john

just put members want return set (noted curly braces), , that's it. no need filter:

select {} on columns, crossjoin(     [waterbody].[waterbody code].[waterbody code],     [waterbody].[waterbody name].[waterbody name],     [waterbody].[waterbody type].[waterbody type],     {        [waterbody].[waterbody full name].[waterbody full name],       [waterbody].[waterbody full name].[waterbody name]     }     )  on rows [waterbody data] 

if using mdx window in sql server management studio edit query, can drag members list in left script. in case, depending on cube configuration details, generated syntax may different - containing ampersand, both should work. however, using feature of the mdx window avoids typos.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -