cancel
Showing results for 
Search instead for 
Did you mean: 

Multi LOOKUP on same cube not allowed

Former Member
0 Kudos

Hi Experts,

I am Trying to use *LOOKUP/*ENDLOOKUP but I am getting an error "Multi LOOKUP on same cube not allowed".

My understanding is you cannot provide more than one variable to the lookup function simultaneously.

So I thought I will pass the variables one by one using the *FOR/*NEXT function.

But I am still getting the same error.

Is there any work around to this limitation of *LOOKUP/*ENDLOOKUP?

Please see below code.

*SELECT(%ENT%,"[ID]","ENTITY","[CALC]=N")

*FOR %E%=%ENT%

*WHEN AUDITTRAIL

*IS "XXXX"

*WHEN ACCOUNT

*IS "YYYY"

*LOOKUP Ownership

*DIM NCIFLASH:TIME=%TIME_SET%

*DIM NCIFLASH:CATEGORY="AAAA"

*DIM NCIFLASH:ENTITY=%E%

*DIM NCIFLASH:INTERCO="I_NONE"

*DIM NCIFLASH:SCOPE="G_ABCD"

*DIM NCIFLASH:O_ACCOUNT="POWN"

*DIM NCIFLASH:MEASURES="PERIODIC"

*ENDLOOKUP

*REC(FACTOR=1-LOOKUP(NCIFLASH), ACCOUNT="XYZ")

*ENDWHEN

*ENDWHEN

*NEXT

Thanks in anticipcation

Collin.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

P.S. In case of:

*REC(FACTOR=1-LOOKUP(NCIFLASH), ACCOUNT="XYZ")


it's better to use push from Ownership model with DESTINATION_APP

Former Member
0 Kudos

Hi Vadim,

What I am trying to achieve through this script logic is as follows:

In the PLAN model in the data manager prompt the User will select multiple dimension members of the ENTITY Dimension.

The LOOKUP function will retrieve the value in account POWN from the Ownership Model for the respective entity.

and for the respective Entity, Multiple this value into value of ACCOUNT "YYYY" in PLAN model and post the value to ACCOUNT "XYZ" in PLAN Model.  

Regards,

Collin.

former_member186338
Active Contributor
0 Kudos

OK, now it's clear!

You don't need to create FOR/NEXT loop, just don't specify members for entity. Members for entity in lookup will be from WHEN/ENDWHEN loop

//single lookup before other code

*LOOKUP Ownership

*DIM NCIFLASH:TIME=%TIME_SET%

*DIM NCIFLASH:CATEGORY="AAAA"

*DIM NCIFLASH:ENTITY=%E%

*DIM NCIFLASH:INTERCO="I_NONE"

*DIM NCIFLASH:SCOPE="G_ABCD"

*DIM NCIFLASH:O_ACCOUNT="POWN"

*DIM NCIFLASH:MEASURES="PERIODIC"

*ENDLOOKUP

*XDIM_MEMBERSET ENTITY=%ENTITY_SET%

*WHEN AUDITTRAIL

*IS "XXXX"

*WHEN ACCOUNT

*IS "YYYY"

*REC(FACTOR=1-LOOKUP(NCIFLASH), ACCOUNT="XYZ")

*ENDWHEN

*ENDWHEN

Vadim

Former Member
0 Kudos

Thanks Vadim.

Works Great.

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

"So I thought I will pass the variables one by one using the *FOR/*NEXT function." - incorrect idea! FOR/NEXT will simply copy text - as a result you will have multiple lookups!

But the script in general is strange, what do you want to achieve? Please read:

Vadim