Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Check if excel cell is blank before loading in qlikview

I have this field called LEVEL3. Basically some of them contain values and some do not. I only want to load those that contain values and therefore as you can see the code below, I have the logical operator AND LEVEL <> '  '. However, this does not work. How do I go about doing this?

IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND LEVEL3 <> '  ', LEVEL2, LEVEL1))) AS LEVEL4,

3 Replies
m_s
Partner - Creator II
Partner - Creator II

Assuming your IF-Statement is correct, have you tried Len(Trim(FIELD)) > 0?

IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND LEN(TRIM(LEVEL3)) > 0 , LEVEL2, LEVEL1))) AS LEVEL4,

stabben23
Partner - Master
Partner - Master

Hi,

try With this:

IF(LEVEL2 = '16.29', LEVEL2, IF(LEVEL2 = '16.31', LEVEL2, IF(LEVEL2 = '16.30' AND (len(LEVEL3 > '0 '), LEVEL2, LEVEL1))) AS LEVEL4,

avinashelite

if you want to reduce the data then directly add a condition in the script

where

len(Trim(LEVEL))>0

OR

len(Trim(LEVEL))>0