Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I currently have a chart with one dimension of "consultant" and two expressions "Average knife to skin time" and "Activity".
However, this is showing dubious results as it includes activities where there was no procedure.
How do I exclude "procedure" where it is null
Thanks very much
Ian
File now attached.
Thanks
Hi,
Can you attach the sample. "Average knife to skin time", "Activity" and "procedure" are fields or any values in the fields.
Regards,
Jagan.
I have attached the file now Jangan
Thanks
Hi,
There is no data in the attached file. What data is there in Procedure field, it has numeric or text.
Regards,
Jagan.
Apologies, I’m new to the Qlikview game.
New file attached with data this time.
Ian
Hi,
Please check the attachment.
Hope it helps you.
Regards,
Jagan.
Working with NULL in set expression wont be that easy, since you can not make selections on NULL values in QlikView. Compare with adding a field containing NULL values in a list box, it is not possible to select NULL in such a list box.
The easiest way to include/exclude NULL in your caluclation is likely to use an IF statement and the IsNull() function. It is a bit unclear in which way you want to exclude the NULL values, so there are two approached to this as far as I can tell.
First, is if you want to exclude the Dimension related to NULL procedures. This would automaticaly also exclude the NULL values from the expressions. If so, add the Dimension as a calculated dimension instead for example like below;
=if(not isnull(Procedure), Consultant)
Second, you want to exclude the NULL values from your expression aggregations. It could look something like;
=Count(if(not isnull(Procedure), [Episode ID]))
A more sofisticated solution would be to change your script, to add a flag the NULL values. There after you could use this flag in set expressions.
Script addition could be like;
Episodes:
Load
*,
if(isnull(Procedure), 1, 0) as ProcedureIsNullFlag
;
LOAD
autonumber(replace("episode_id",':','-'), 'EP') as %Episode_ID,
replace("episode_id",':','-') as [Episode ID],
/.../
The set expression could then look like;
=Count({$<ProcedureIsNullFlag={0}>} [Episode ID])
Hi Ian,
Please find attached example. I’m assuming that you arereferring Unknown as Null in your case. Please let me know if this is not thecase.
Here is the expression :
Sum ([Knifeto skin time]) / TextCount ({<Procedure -= {'Unknown'}>} EpisodeID)
I hope this helps!
Cheers - DV