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: 
Shailaja_Marripalli
Contributor
Contributor

Formula for excluding the values

if(RDM_COUNTRY_CODE = 'GB',
<RDM_COUNTRY_CODE -={'Charge Inquiry','EU WTR2 Inbound RFI','EU WTR2 Outbound RFI','EU WTR2 Outbound RFI-Ex post','GPS Failed Entries',
'Incorrect Credit Account'}>)

if(match(METRIC,'9. SLA ACHIEVEMENT % OF ACTIONABLE CASES - TIER WISE','10. DAY 1 - SLA ACHIEVEMENT %','11. DAY 2 - SLA ACHIEVEMENT %'),
num(SUM(NOMINATOR)/SUM(DENOMINATOR),'#,##0.00%'), sum(NOMINATOR))

 

I am writing the above formula.I have to exclude the values and then calculation has to be done. But I am getting the an error. Please help me with the formula

 

 

5 Replies
PriyankaShivhare
Creator II
Creator II

i am not sure about ur rquirement

but ur numerator sum wud be this based upon ur condtions

sum({<
<RDM_COUNTRY_CODE =-{'Charge Inquiry','EU WTR2 Inbound RFI','EU WTR2 Outbound RFI','EU WTR2 Outbound RFI-Ex post','GPS Failed Entries',
'Incorrect Credit Account'},METRIC={'9. SLA ACHIEVEMENT % OF ACTIONABLE CASES - TIER WISE','10. DAY 1 - SLA ACHIEVEMENT %','11. DAY 2 - SLA ACHIEVEMENT %'}NOMINATOR)

Thanks,

Priyanka

Shailaja_Marripalli
Contributor
Contributor
Author

My condition is if in the field RDM COUNTRY CODE = GB then i should exclude the values in other  field i.e., label and the values are  Charge Inquiry','EU WTR2 Inbound RFI','EU WTR2 Outbound RFI','EU WTR2 Outbound RFI-Ex post','GPS Failed Entries','Incorrect Credit Account.

 

After excluding i should do the calculation i.e.,

if(match(METRIC,'9. SLA ACHIEVEMENT % OF ACTIONABLE CASES - TIER WISE','10. DAY 1 - SLA ACHIEVEMENT %','11. DAY 2 - SLA ACHIEVEMENT %'),
num(SUM(NOMINATOR)/SUM(DENOMINATOR),'#,##0.00%'), sum(NOMINATOR))

 

which is valid and working perfectly.

 

After writing this formula i recd a requirement from client to remove the details of those lines.  I may receive some more conditions from different countries....so i want to keep the calculation in the same way and wants to go on adding the condition when ever i receive from countries

MayilVahanan

HI @Shailaja_Marripalli 

If the requirement is fixed, you can move the country condition in the script and create a flag and use that flag in ur front end expression. 

Suppose , its dynamic, you can create a variable and use it.

Hope it helps. 

No need to implement that logic in many places.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Shailaja_Marripalli
Contributor
Contributor
Author

I cant exclude the data it has to be shown in other table.... thats y i want to be implemented in formula

MayilVahanan

HI, 

Its not means to exclude the data from ur app, you need to create a flag based on ur condition. And use that flag in set analysis.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.