Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum(if(...)) vs. if(...), "Total Mode": Sum

I have an IF condition: if(Customer_ID > 100 and Item>40 and Item <=20,1,0) and would like to get the sum of this to be used in a bar chart.

When I calculate the value of this expression in a straight table for every data set and sum them up with the total mode i get nice results:


On the otherhand, if I take the sum already in the expression of bar chart. It tells me that there would be "no data to be displayed". :


Does anyone have a clue why this does not behave the same way?



1 Reply

sum(if(...)) vs. if(...), "Total Mode": Sum

I assume your straight table has some dimensions, right? These dimensions group your data records such that each line, i.e. the if() function, will evaluate to one unambiguous result, zero or one.

If you use your expression in a chart with no or other dimensions, you probably won't get a single answer to the if() statement, so the if() will return NULL, therefore you will get "no data to display".