cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between resultlookup(statement1) vs [d/dim1]

praveen_kumar334
Participant
0 Kudos

Hi Team,

I am having challenge in understanding the RESULTLOOKUP[d/dim1] vs [d/dim1] statement. Below is the one of the example i have considered.

vs

what is the difference between the statement RESULTLOOKUP[d/dim1] = 'ABC and [d/dim1], basically To get the value(to read the value) we will use the RESULTLOOKUP but in this case, when using the resultlookup i am getting the error. Can someone please help what is the difference between the statement resultlookup[d/dim1] vs [d/dim1]

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Kudos

praveen.kumar334

Only the first syntax is valid, the second one is not a valid syntax in SAC. RESULTLOOKUP is used to read the fact data ( transaction data ) from model by specifying the intersection in terms of dimensions with the RESULTLOOKUP() statement. You cannot use RESULTLOOKUP to read attributes.

Br.

Nikhil

praveen_kumar334
Participant
0 Kudos

Yes Basically RESULTLOOKUP is used to read the transaction data from Model, but I also see statement as below:

IF [d/ACCOUNT]="PRICE" THEN // here in this statement, we don't have RESULTLOOKUP

ELSEIF RESULTLOOKUP([d/ACCOUNT]="PRICE")>0 THEN // this statement has RESULTLOOKUP

ELSE

DATA([d/ENTITY]="AsiaPacific", [d/Product]="Product1")=100

ENDIF

What is the difference between the above 2 highlighted piece of code, both are trying to read the transaction data from Model ?

N1kh1l
Active Contributor
0 Kudos

praveen.kumar334

IF [d/ACCOUNT]="PRICE" THEN // here in this statement, we don't have RESULTLOOKUP

This is checking if the Account is PRICE, so this is a master data check of Account dimension. This is why no RESULTLOOKUP required.

ELSEIF RESULTLOOKUP([d/ACCOUNT]="PRICE")>0 THEN // this statement has RESULTLOOKUP

This is checking if the value stored on Account dimension member PRICE is greater than 0. This has RESULTLOOKUP as this is a check on transaction data

As I said earlier RESULTLOOKUP is required to read transaction data from model. To check dimension master data you dont need RESULTLOOKUP.

Hope this helps !!

Br.

Nikhil