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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
DCO
Contributor
Contributor

Missing Fields

Hello everyone,

I’m working on a Qlik expression to identify missing values in the site_name field, but I’m running into an issue. The current logic doesn’t catch cases where the field contains a placeholder like '-'.

Here’s the expression I’m using:

If(
Count(
DISTINCT If(
Match(Product, '$(VTypeProduct)') and
Match(ClassProduct, 'Device', 'Hardware') and
Match(GenericClass, 'Ser', 'Brute') and
Len(Trim(site_name)) = 0 or (site_name=''),
resource
)
) > 0,
'',
''
)

The goal is to return if any matching records have a missing or placeholder site_name, and otherwise.

Could someone please confirm if this logic is correct or suggest improvements?

Thanks in advance!

 

Labels (1)
2 Replies
Or
MVP
MVP

I don't think anyone is going to be answer this except you - we can't see your data and we have no way of knowing which placeholders might be in use. 

Regarding:

Len(Trim(site_name)) = 0 or (site_name='')

The second half should be unnecessary, since the trim of empty string is length 0. 

robert_mika
MVP
MVP

'-' this could be a real dash or null() value in both cases use the IF statement first if its cover all cases.

if isnull(site_name) , if len(site_name), if site_name='-'