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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DMU1
Contributor II
Contributor II

Exclude some values of a field when calculating the percentage in expressions

Hi everyone,

I'm new to QlikView and have a hard time excluding certain values from calculating the percentage of a dimension.
in expressions I have the following formula:


Count ({<Order_Status = {'Pre-Order'}>} Order_Status) / Count (Order_Number)


and I would like to exclude from the count the records that in the field [Reason] contain the value 'reinsert'.
I tried like this:


if (not match (Reason, 'REINSERT'), Count ({<Order_Status = {'Pre-Order'}>} Order_Status) / if (not match (Reason, 'REINSERT'), Count (Order_Number)))

But it does not work. can you suggest me a solution?

1 Solution

Accepted Solutions
Quy_Nguyen
Specialist
Specialist

Hi,

Try this one: 

Count ({<Order_Status = {'Pre-Order'}, Reason-={'REINSERT'}>} Order_Status) / Count ({<Reason-={'REINSERT'}>} Order_Number)

 

 

View solution in original post

2 Replies
Quy_Nguyen
Specialist
Specialist

Hi,

Try this one: 

Count ({<Order_Status = {'Pre-Order'}, Reason-={'REINSERT'}>} Order_Status) / Count ({<Reason-={'REINSERT'}>} Order_Number)

 

 

DMU1
Contributor II
Contributor II
Author

It works, thanks a lot  🙂