Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

How to restrict percentage holding for each Branch for 100%

Dear Friends!

Please help me to get the  holding percentage of each product as a percentage of total value for each Branches separately. Now it is distributed over two Branches.Simply I need 100% for RA & 100% EH etc

SUM({<PRODUCT_CODE={'MC','TC','HH','PP','M4','MS','TT','EN','M3','EN','SS','MR','SI'},ACCOUNT_CODE={'61210','61260','61310','61320','61360','61510','61740','61760','61160','61460','61560','61270'}>}C_BALANCE)

/

SUM(TOTAL  {<PRODUCT_CODE={'MC','TC','HH','PP','M4','MS','TT','EN','M3','EN','SS','MR','SI'},ACCOUNT_CODE={'61210','61260','61310','61320','61360','61510','61740','61760','61160','61460','61560','61270'}>}C_BALANCE)

Thanks

Neville

1 Reply
nevilledhamsiri
Specialist
Specialist
Author

Hi,

This was achieved by applying following expression. Now I need to break total products such as MC,M4 & M3  as Motor where as others as NM. I have tried to load it through pick match  but it gives a syntax error so i commented it.Product codes are loaded as a load in line.

I need following solutions

1) how this separation could be made

2) I need 100% to be gone over RA & EH Branches similarly over Motor & NM. Can we use two <> symbols to cover up two criterias if so how it could be combined

LOAD BR_CODE, ACCOUNT_CODE, TYPE, OP_DR, OP_CR, MO_DR, MO_CR, DR, CR AS C_BALANCE

FROM (ooxml, embedded labels, table is [TB(RA)]);

//LOAD

//*,Pick(MATCH(PRODUCT_CODE,'MC','M4','M3')+1 ,'MO','MO','MO','NM')AS MONM_FLAG

SUM({<PRODUCT_CODE={'MC','TC','HH','PP','M4','MS','TT','EN','M3','EN','SS','MR','SI'},ACCOUNT_CODE={'61210','61260','61310','61320','61360','61510','61740','61760','61160','61460','61560','61270'}>}C_BALANCE)

/

SUM(TOTAL <BR_CODE> {<PRODUCT_CODE={'MC','TC','HH','PP','M4','MS','TT','EN','M3','EN','SS','MR','SI'},ACCOUNT_CODE={'61210','61260','61310','61320','61360','61510','61740','61760','61160','61460','61560','61270'}>}C_BALANCE)