Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
DMU1
Contributor
Contributor

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)

 

 

View solution in original post

DMU1
Contributor
Contributor
Author

It works, thanks a lot  🙂