Question

Naveen_kumar on Fri, 15 Apr 2016 10:16:37


Hi All,

Please find the existing MDX code here:

SCOPE([Reporting].[Reporting].[Seadle]);        
    this=


iif(([Reporting].[Reporting].[BCT],
[Measure].[Measure].&[ABS],[Company].[Company].[Sim])=0,null,

expressions

END SCOPE; 

Now, the requirement is that in iff condition need to  [Reporting].[Reporting].[SA] as well
From [Reporting] dimension, both BCT and SA values needs to be checked for '0'

Tried with tuple sets but didnt work

Someone kindly help me to refine MDX code for this.

Thanks in advance


Sponsored



Replies

yger on Fri, 15 Apr 2016 11:29:04


Depending...

iif( SUM(({[Reporting].[Reporting].[BCT],[Reporting].[Reporting].[SA]},[Company].[Company].[Sim])
,[Measure].[Measure].&[ABS])=0,null, Expression

or

iif( SUM(([Reporting].[Reporting].[BCT],[Company].[Company].[Sim])
,[Measure].[Measure].&[ABS])=0 or SUM(([Reporting].[Reporting].[SA],[Company].[Company].[Sim])
,[Measure].[Measure].&[ABS])=0,null, Expression

or

iif( SUM(([Reporting].[Reporting].[BCT],[Company].[Company].[Sim])
,[Measure].[Measure].&[ABS])=0 and SUM(([Reporting].[Reporting].[SA],[Company].[Company].[Sim])
,[Measure].[Measure].&[ABS])=0,null, expression

Simon_Hou on Sat, 16 Apr 2016 06:26:13


Hi Naveen_kumar,

In this scenario, using tuple sets supposes to work. You just need to put two dimension member into same bracket to crossjoin them. Then expression can be like:

=IIF((([Reporting].[Reporting].[BCT],[Company].[Company].[Sim]),[Measure].[Measure].&[ABS])=0,0,expressions)

See my test below:

Regards,

SP.Naveenkumar on Fri, 22 Apr 2016 07:08:13


Hi Bro,

Thanks a lot.

It worked as expected  but i don't know the logic behind the function 'SUM' here. I will google and learn it for sure.

SP.Naveenkumar on Fri, 22 Apr 2016 07:09:16


Hi Simon,

Thanks for your reply and suggestion.

I will try this logic.