Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can I set value NULL in set analysis?
sum({<CostoVen={NULL}>} Sales) [convert from sum(if(IsNull(CostoVen),Sales)]
Tanks You
Sorry, my sum({$-<CostoVen={"%*%"}>} Sales) it doesn't work,
but your suggestion doesn't even work.
Hi
Try like this
Sum({<CostoVen-={"*"}>} Sales)
Hope it helps
Please post a sample .qvw
Preparing examples for Upload - Reduction and Data Scrambling
Hi Mayil,
I have already tried. It doesn't work.
Thanks
I don't think that this is possible with set analysis. The only way would be to have a 1/0 flag defined in the load script as jpapador mentioned earlier.
The reason why this isn't possible with SA is that set analysis basically functions like static user selections. See my explanation in this thread: http://community.qlik.com/message/450877#450877.
Since QV doesn't allow selections of NULL values, it's not possible to create a set expression for NULL values.
Actually Jeffrey Vermeire, it is possible to count null values using set analysis like the following:
=count({$-<Value={'?*'}>}Field)
Please see attached file for an example.
I recommend reading the excellent paper "Null and Nothing" by Henric Cronström available at NULL handling in QlikView
In the section "NULLs and missing values in Set analysis", HIC shows three ways to select null in Set Analysis. Here's one way :
sum({1-<CostoVen={*}>} Sales)
-Rob
Jeffrey,
I've used the solution that Celambarasan Adhimulam showed here many times, and it worked.
I don't disagree though that adding flags in script makes things simpler.
Regards,
Michael
Thanks Jeffrey,
Thanks to Everybody.
I have not found solution.
I will continue to use sum(if(IsNull(CostoVen),Sales)) that works well
or I modify the script inserting
NullAsValue CostoVen;
SET NullValue = 0;
and I reload the data.
Regards,
Antonio
Nicole,
There is no need for "?" here, unless you want to count blank values as nulls.
Regards,
Michael
Edit: in the attached, there are both versions