Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to Qlikview and have come across a blocker that I've not been able to get around.
I want to carry out a variable count of one column and based on that outcome carry out a Count DISTINCT of another column.
To put into context;
MFPN Unique ID
1 9
2 NULL
3 8
1 NULL
1 7
2 6
I want to look at Unique ID and where the value doesn't = NULL I want to carry out a Distinct Count of MFPN
I have tried
Count (DISTINCT MFPN (if ([Unique ID], (not 'NULL'), ([Unique ID])))
I know its wrong but its as close as I can get!!
Any help will be apprecited.
Thanks,
Phil
=count({$<[Unique ID]-={"NULL"}>} [Unique ID])
Try
Count (DISTINCT MFPN (if ([Unique ID]<> 'NULL'), ([Unique ID])))
Thanks Rajni, however, that throws back an error with the use of the 'if' expression.
Any thoughts?
can u exactly show me what result r u expecting exactly from this kind of expression
In the context of the example I gave it should bring back a count of 4 as 2 of the MFPN's have NULL in there corresponding Unique ID field and I want to exclude the NULL values from the DISTINCT Count.
Does that help?
=count(if([Unique ID]<>'NULL',[Unique ID]))
so i think it would be good enough
=count({$<[Unique ID]-={"NULL"}>} [Unique ID])
Thanks Whiteline. Worked perfectly