Skip to Content
0
Mar 02, 2011 at 01:38 PM

MDX Script Logic -> How create a select between two FOR

129 Views

Hi Gurus,

I got perfomance problem becouse my secuence of FOR are including all members. I need to restrict the members including in the second FOR. (BPC 7.5 NW, SP05)

Please look at my scenarios:

// Current Scenario -


*SELECT (%ALLCECO%, "[ID]", CENTRODECOSTO, [DISTRIB] = "D")

*XDIM_MEMBERSET CENTRODECOSTO = %ALLCECO%

*SELECT (%ALLCECOREC%, "[ID]", CECOINT, [OHEAD3] = "VO")

*XDIM_MEMBERSET CECOINT = %ALLCECOREC%

*FOR %MES% = %MESES%

  • FOR %CECO_EMI% = %ALLCECO%

  • FOR %CECO_REC% = %RR%

  • NEXT

  • NEXT

*NEXT

// I need to do the next..

*SELECT (%ALLCECO%, "[ID]", CENTRODECOSTO, [DISTRIB] = "D")

*XDIM_MEMBERSET CENTRODECOSTO = %ALLCECO%

*FOR %MES% = %MESES%

  • FOR %CECO_EMI% = %ALLCECO%

  • SELECT (%RR%,"[ID]", CECOINT, [DISTR] = %CECO_EMI%)

*

  • FOR %CECO_REC% = %RR%

  • NEXT

  • NEXT

*NEXT

But I can not do the last one. I can not use a variable %Ceco_Emi%. Someone knows how can do it?

Thanks a lot

Regards

Leticia