If statement not working on the true side once dealing with NULL values
I have met with a strange issue where by a straight forward IF condition is not working for me in the charts. Below is a simple table:
I am, trying to use the IF condition to show some text in the third column but its not working. I used it by using null as well using the length but didn't work in both the cases. Here are the two IF statements:
Null in qlik (and probably in all BI tools) is a topic that needs proper understanding to deal with it correctly. The nulls that you are seeing here, are probably 'NULL values created as a result of the of field value combinations to be displayed in a table', that means they actually are not part of your data structure. Hence, you can't really catch them in expression at the front-end. Read and learn more about this 'neglected giant' here :
Yeah they are not part of the data, I agree to it, but how to catch it as I need to do some decision making on it. Secondly when in the dimension I uncheck "include null values" it dosesn't display the rows with "-" so I thought may be I could handle it by checking for it as NULL.
Only() is an aggregation function, hence to use this in the script load statement, you would need 'group by' clause. Also, be aware that, if you are using this statement, for the same problem in chart you stated above, it might not give the same result, because of the data combination differences (unless you are joining the tables).