Skip to main content

App Development

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

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
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  🙂