Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum IF Help Needed

Hi All,

This is my first post on the Qlik Community so please be gentle.

I'm trying to create an expression to show results if [WTE Contracted]-[WTEBudget] is less than zero.

sum(if([WTE Contracted]-[WTE Budget]<0, [WTE Contracted]-[WTE Budget]))

But it doesn't seem to want to work.

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This worked for those interested:

=if(sum([WTE Contracted])-[WTE Budget]<0, sum([WTE Contracted])-[WTE Budget])

View solution in original post

9 Replies
olivetwist
Creator
Creator

does this work?

If([WTE Contracted]-[WTE Budget]<0, sum([BCUESR.WTE Contracted]-[WTE Budget]))

Anonymous
Not applicable
Author

Unfortunately not, it's coming through as a dash.

vishsaggi
Champion III
Champion III

What is your expression for [WTE Budget] ? May be this ? Can you try?

sum(if([WTE Contracted]-(YourActualexpre for Budged)<0, [WTE Contracted]-(YourActualexpre for Budged)))

Anonymous
Not applicable
Author

This expression now pulls through as 0.00:

sum(if([WTE Contracted]-([WTE Budget])<0, [WTE Contracted]-([WTE Budget])))

sunny_talwar

Is WTE Contracted and WTE Budget field names or expression labels?

Anonymous
Not applicable
Author

They are expression labels.

I've got this to work:

sum([WTE Contracted])-[WTE Budget]

But I can't get it to only show results if they are <0.

vishsaggi
Champion III
Champion III

What is your expected output? Can you show some data or sample?

Anonymous
Not applicable
Author

This worked for those interested:

=if(sum([WTE Contracted])-[WTE Budget]<0, sum([WTE Contracted])-[WTE Budget])

olivetwist
Creator
Creator

i forgot the first sum, nice one.