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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Kartik_semwal_99
Partner - Contributor
Partner - Contributor

Need to remove some filters from one table and add it to another

Hii Guys,
 
I have a requirement in which from the Rent table i need to remove my SALES_AMNT and  _KEY_ACCOUNT_CODE and add it to my ODC table.
 In the Front end, under Rent Repair, the below  _KEY_ACCOUNT_CODE and NEW_COMPANY_CODE should not come instead it should come under Other Direct Costs
 
 (match([_KEY_ACCOUNT_CODE],'404630','404640','404740','404830','404840','404845','404846','404850','404861','404875','404880') and match(NEW_COMPANY_CODE,'421','406','1003','412','439')) // RENT - ODC
 
 
Can we achieve this?
Below is the code I've tried but unfortunately I'm able to see these _KEY_ACCOUNT_CODE and NEW_COMPANY_CODE under Repair Flag.
 
ODC:
load [_KEY_ACCOUNT_CODE], ACCOUNT_DESC,_KEY_PERIOD,COMPANYTYPE,COMPANYNAME,NEW_COMPANY_CODE,BASE_UNIT,
'CM' as FLAG,
[ACTUAL PERIOD ACCT AMOUNT]*-1 * SHARE_PERCENT_ESG as SALES_AMNT,
[BUDGET PERIOD NET AMOUNT]*-1 * SHARE_PERCENT_ESG as Budget_Amnt,
'Other Direct Costs'  as Particulars
From [lib://QVD_GL (oicqlikdev_it.manju)/ESG_FLASH_TEST.qvd](qvd)
where ((MATCH(PARENT_ACCOUNT,'400100') and not match([_KEY_ACCOUNT_CODE],'400195','401950') AND PARENT_ACCOUNT <> ACCOUNT_CODE1) 
     -(match([_KEY_ACCOUNT_CODE],'400121','400123','400126','400127') and match(NEW_COMPANY_CODE,'421','406','1003','412','439')) // ODC- SCC
     -(match([_KEY_ACCOUNT_CODE],'400130','400132','400185','400190','400202') and match(NEW_COMPANY_CODE,'421','406','1003','412','439')) // ODC-MC
     +(match([_KEY_ACCOUNT_CODE],'404630','404640','404740','404830','404840','404845','404846','404850','404861','404875','404880') and match(NEW_COMPANY_CODE,'421','406','1003','412','439')) // RENT - ODC
     +(match([_KEY_ACCOUNT_CODE],'402220','402225') and match(NEW_COMPANY_CODE,'421','406','1003','412','439')) // Direct Labour Cost - Other Direct Cost
+ ( match([_KEY_ACCOUNT_CODE],'403150')))
     - (match([_KEY_ACCOUNT_CODE],'400110','400112','400126') and NEW_COMPANY_CODE='404') // ODC to Material Cost, ODC to Sub Contract Cost
     ; 
 
[Rent,Repair,Transport etc]:
load [_KEY_ACCOUNT_CODE], ACCOUNT_DESC,_KEY_PERIOD,COMPANYTYPE,COMPANYNAME,NEW_COMPANY_CODE,BASE_UNIT,
'CM' as FLAG,
[ACTUAL PERIOD ACCT AMOUNT]*-1 * SHARE_PERCENT_ESG as SALES_AMNT,
[BUDGET PERIOD NET AMOUNT]*-1 * SHARE_PERCENT_ESG as Budget_Amnt,
'Rent,Repair,Transport etc'  as Particulars
From [lib://QVD_GL (oicqlikdev_it.manju)/ESG_FLASH_TEST.qvd](qvd)
WHERE (MATCH(PARENT_ACCOUNT,'404600','404800','404700') AND PARENT_ACCOUNT <> ACCOUNT_CODE1) 
+ (MATCH([_KEY_ACCOUNT_CODE],'404100','404200','404300','404400','404500','306070'))

    -(match([_KEY_ACCOUNT_CODE],'404630','404640','404740','404830','404840','404845','404846','404850','404861','404875','404880') and match(NEW_COMPANY_CODE,'421','406','1003','412','439'))

    +  (match([_KEY_ACCOUNT_CODE],'506850','521305','521290') and NEW_COMPANY_CODE='404') // Depreciation to Rent, Other income and exp to Rent, Interest Expenses (Net) to Rent
    ;

 

Labels (2)
0 Replies