Skip to main content
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

sum of If statement



I have this if statement below. The logic is great but why does it only sum up the [GL Budget $]? 

IF(isNull([JC Job Desc]), [GL Budget $], num(sum(distinct [Max Cost Budget Closing]),'#,##0.00;-#,##0.00'))

I would expect it to sum up all values in the column calculated by the if statement.


FYI: [GL Budget $] is a measure that sums all the gl budget while [Max cost budget closing] is a field


Thank you

Labels (2)
1 Reply
Former Employee
Former Employee

Because there are probably multiple values of [JC Job Desc], and then it is evaluated to NULL. So your condition is always true.

Wrap [JC Job Desc] in an aggregation function.

See more on