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,
Loadcase
Re: Loadcase
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;
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
Thank you Aaron . I will try it, I toughs length of dictionary item should match during loadcase.
Re: Loadcase
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;
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;