Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
surtex
Contributor III
Contributor III

Add Allocation Logic at data editor

Hello together,

I have the following problem. The main table has 20 different columns and the relevant fields below. Now I would like to ignore the new allocation logic. If Cost_Center_Code = 100014899X  AND Cost_Element_Indicator = '0999014400_S' then I would like to overwrite the Cost_Center_Code with CO_Partner Object. And If CO_Partner_Object = 100014899X then I would like to overwrite the CO_Parnter_Object with the CO_Partner_Object if Cost_Center_Code = '100014899X' AND Cost_Element_Indicator = '0999014400_H'. 

The normal logic.

CostCenter(Sender) <> 100014899X (Debit_Credit_Indicator = 'H') sends to CO_Partner_Object (Final Receiver) (here you can see as Costs = Debit_Credit_Indicator = 'S') 

The new logic (where I don't want to see the intermediate step):

CostCenter(Sender) <> 100014899X (Debit_Credit_Indicator = 'H') sends to 100014899X (in this case the CO_Partner_Object) and CostCenter = 100014899X sends to CO_Partner_Object (Final Receiver) 

 

Example:

Old logic: Cost_Center_Code (Sender) -> CO_Partner_Object (Final Receiver)

123456789 sends to 234567891

New logic: Cost_Center_Code (Sender) -> 100014899X (CO_Partner_Object) -> CO_Partner_Object (Final Receiver)

123456789 sends to 100014899X sends to 234567891

 

Cost_Center_Code,

Cost_Element_Code,

Debit_Credit_Indicator,

CO_Partner_Object,

Cost_Center_Amount

Cost_Element_Code & ' - ' & Debit_Credit_Indicator as Cost_Element_Indicator

 

 

Can anyone help me?

Thanks and regards

Josh

 

 

Labels (3)
1 Reply
Gaël
Contributor III
Contributor III

Maybe something along these lines?

LOAD
  If(tmp.Cost_Center_Code = 100014899X  AND Cost_Element_Indicator = '0999014400_S', 
tmp.CO_Partner Object, tmp.Cost_Center_Code) AS Cost_Center_Code,
  ...
LOAD
  Cost_Element_Indicator,
  Cost_Center_Code  AS tmp.Cost_Center_Code,
  CO_Partner Object AS tmp.CO_Partner Object;
RESIDENT ...;