i want filter out dimensions if metric values not exist on dimension, have metric containing raw data ie, infinity, 1.#nn. using non empty()
not filtering data correctly filter dimension if metrics null in case fetch 'infinity' dimensions too:
mdx query:
select { [measures].[1], [measures].[2], [measures].[3] } dimension properties parent_unique_name on columns , non empty hierarchize ( { drilldownlevel ( { [roles].[dimension].[all] } ) } ) dimension properties parent_unique_name , [roles].[roster role].[roster role].[roster role - enterprise] , [roles].[roster role].[roster role].[roster role - group] on rows [cuve] ( [dates].[calendar].[calendar year].&[2013], [markets].[market].&[1], [areas]. [area].&[8], [roles].[enterprise role].&[2] )
i can not nonempty()
remove dimension if of metric null while want remove if null.
i want can filter out dimension, ie if metric value not integer (eg, "infinity" or other data) or filter out not in()
kind of function.
thanks
first, sounds dividing 0 in calculations measures. if can, rewrite them return null denominator 0. like:
iif([measures].[denominator] = 0, null, [measures].[numerator/[measures].[denominator])
then can use filter. i'm not quite sure know enough cube's structure write query, try this:
select { [measures].[1], [measures].[2], [measures].3]} on columns, { filter([roles].[dimension].[dimension].members, coalesceempty([measures].[1],[measures].[2],[measures].[3], 0) <> 0) * ({[roles].[roster role].[roster role].[roster role - enterprise], [roles].[roster role].[roster role].[roster role - group]})} on rows [cuve] ( [dates].[calendar].[calendar year].&[2013], [markets].[market].&[1], [areas]. [area].&[8], [roles].[enterprise role].&[2] )
Comments
Post a Comment