sql server 2008 r2 - Filtering a CUBESET using a different variable without hierarchies -


i'm trying produce cubeset returns members correspond field in powerpivot dataset. because organisation behind we're using old version of powerpivot (sql server 2008r2 version) doesn't allow hierarchies etc. can't use functionality; i've been trying use filter mdx function can't work.

in example below, [level 1] , [level 2] are product groups, 2 being below one. i'm trying return members of [level 2] correspond [level 1].[product 1]:

    =cubeset("powerpivot data",     "filter([table].[level 2].[all].members,      [table].[level 1].[all].currentmember='product 1')","caption") 

this returns #n/a error in excel. if has way result please shout!

looks string error - need double speach marks around product 1?:

"filter([table].[level 2].[all].members,      [table].[level 1].[all].currentmember=''product 1'')" 

the above not problem.

the problem condition not valid mdx [table].[level 1].[all].currentmember='product 1' should using descendants function use case you've presented:

"descendants([table].[level 1].[product 1],[table].[level 2])" 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -