mdx - Is it possible to collapse several similar nodes of different branches in a hierarchical dimension? -
mdx - Is it possible to collapse several similar nodes of different branches in a hierarchical dimension? -
let's have next hierarchy utilize dimension: root a1 b11 b12 ... b1n b1special a2 b21 b22 ... b2n b2special ... am bm1 bm2 ... bmn bmspecial under each of "b" nodes there several more nodes @ different levels. each leaf of hierarchy has measure associated (sum of fact f). possible mdx have sum of , items children of "special" nodes?
i have assume want see sum of 'special' nodes once, @ root level. in other words, want see 1 number in results set.
assuming hierarchy detailed in original question called 'bob', , had dimension called 'kate', might seek this...
with fellow member [bob].[only special levels] 'aggregate( filter( {[bob].[name of level holds b members].members}, instr(1, [bob].currentmember.name, "special") > 0 ) )' select {[kate].defaultmember} on rows, {[measures].[whever want see aggregated]} on columns [cube name] ([bob].[only special levels])
this creates new, temporary, fellow member in bob dimension, aggregation of several other members in bob dimension. start members sit down in 1 particular level. filter
chooses members have word "special" in name.
note instr
vba function supported microsoft ssas. returns 0 if chosen string not found. alternative string searching functions may available in other flavours of mdx.
you utilize new fellow member in where
clause, , slap other dimensions/measures wherever want.
mdx hierarchy dimension
Comments
Post a Comment