Loadcase

Discussions about editing and cleaning data
Post Reply
etuser
Posts: 36
Joined: September 3rd, 2019, 5:57 am

Loadcase

Post by etuser » June 12th, 2020, 9:04 am

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,

aaronw
Posts: 399
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Loadcase

Post by aaronw » June 12th, 2020, 12:18 pm

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;

etuser
Posts: 36
Joined: September 3rd, 2019, 5:57 am

Re: Loadcase

Post by etuser » June 13th, 2020, 1:07 am

Thank you Aaron . I will try it, I toughs length of dictionary item should match during loadcase.

aaronw
Posts: 399
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Loadcase

Post by aaronw » June 15th, 2020, 9:16 am

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;

Post Reply