Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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