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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Sum(If to do a subtraction on fields in a text box

Hi am using version 8.5. Just getting going with the product and I have a question on the sum(if commands

I am trying to do the following, will illustrate at the very basic level, want to format it in currency once the basic issue is resolved

=sum(if([Field1] = 'Blah', revenue-COST))

Returns a 0

If I do =sum(revenue)-sum(COST)

that works

I can do other calulations with the sum(if such as

=

sum(if([POD Type] = 'POD - EL' or [POD Type] = 'POD - NEL', MONEY(revenue,'£#,###')))





But the simple subtraction wont work, sorry about this really obvious question, I think it is a matter of syntax but Ive tried all sorts of combinations and cant get it to work

Thanks a lot for any help

Stephen

1 Solution

Accepted Solutions
Not applicable
Author

Hello I got round this by using variables

thanks

View solution in original post

2 Replies
Not applicable
Author

PS I have just tested this in a sample application and it works fine

=sum(if([Field1] = 'Blah', revenue-COST))

In the real application the numbers in the fields are huge, not sure why this is happening, hope I can get some pointers thanks

Not applicable
Author

Hello I got round this by using variables

thanks