Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
aria_123
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
jonnaamb
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
Vegar
MVP
MVP

Try this expression:
=Round (Sum ({<Type={'Issues'}, Status -={'Rejected','Canceled'}>} [Cost Ratio]), 0.01)
jonnaamb
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

aria_123
Contributor
Contributor
Author

Wow.  Thanks for quick responses.   It works!