Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Sum with multiple conditions

How do I sum based on multiple conditions?

I only want the approved and pending Status sum cost from Type=issue.  

Type == Issue  AND (Status != "Rejected" OR  Status !="Rejected")

    =Round (Sum ({<Type={'Issues'}, Status -={'Rejected'} , Status -={'Canceled'}>} [Cost Ratio]), 0.01)

But with this, I keep getting the "Rejected" ones.   It does exclude the "Canceled" items. 

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

Hello Aria,

The same modifier cannot be given twice in one expression. When you give 'Status' twice, it is considering the second 'Status' as null. I've attached a screenshot as to how Set Analysis can be remembered easily. 

The ideal expression would be this:

=Round (Sum ({<Type={'Issues'}, Status -={'Rejected','Canceled'}>} [Cost Ratio]), 0.01)

Best regards,

Ambareesh

View solution in original post

3 Replies
Highlighted
Partner
Partner

Try this expression:
=Round (Sum ({<Type={'Issues'}, Status -={'Rejected','Canceled'}>} [Cost Ratio]), 0.01)
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor III
Contributor III

Hello Aria,

The same modifier cannot be given twice in one expression. When you give 'Status' twice, it is considering the second 'Status' as null. I've attached a screenshot as to how Set Analysis can be remembered easily. 

The ideal expression would be this:

=Round (Sum ({<Type={'Issues'}, Status -={'Rejected','Canceled'}>} [Cost Ratio]), 0.01)

Best regards,

Ambareesh

View solution in original post

Highlighted
Contributor
Contributor

Wow.  Thanks for quick responses.   It works!