Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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.
'-' 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='-'