Page 1 of 1

Loadcase

Posted: June 12th, 2020, 9:04 am
by etuser
Dear Sir,

I created a lookup file which contains prices of goods at different geographical level in on file per record , is there a possibility to do first an EA level match and if item found at ea level the compare and take EA price , if not go to district and ......

The file look like ---> Region Zone District EA EA Price District Price zone price EA Price

Thank you,

Re: Loadcase

Posted: June 12th, 2020, 12:18 pm
by aaronw
Does this logic behave the way you want?
if loadcase(DICT_PRICES, ZONE, DISTRICT, EA) then

    if
PRICES_EA <> notappl then
        // impute logic for EA
        // ...
   
elseif loadcase(DICT_PRICES, ZONE, DISTRICT) then

        if
PRICES_DISTRICT <> notappl then
            // impute logic for District
            // ...
       
elseif loadcase(DICT_PRICES, ZONE) then

            if
PRICES_ZONE <> notappl then
                // impute logic for Zone
                // ...
           
endif;

       
endif;

   
endif;

endif;

Re: Loadcase

Posted: June 13th, 2020, 1:07 am
by etuser
Thank you Aaron . I will try it, I toughs length of dictionary item should match during loadcase.

Re: Loadcase

Posted: June 15th, 2020, 9:16 am
by aaronw
You're correct, the combined length of the variables needs to be equal to the length of the case id. Take a look at this:
if loadcase(DICT_PRICES, ZONE, DISTRICT, EA) then

    if
PRICE_EA <> notappl then
        // impute logic for EA
        // ...
   
else if PRICE_DISTRICT <> notappl then
        // impute logic for District
        // ...
   
else if PRICE_ZONE <> notappl then
        // impute logic for Zone
        // ...
   
endif;

endif;