Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm creating a table to monitorate all my tables.
I would like also to know the nuber of null values for each field in each table, is it possible?
I tried with nullCount($Fields) but Id doesn't work.
It gets a bit tricky to do this in a generic way without hardcoding the fieldname. The expression I've found that works is:
pick(
FieldIndex('$Field', only({1<$Table=P($Table), $Field=P($Field)>}[$Field]))
, $(=concat({1} DISTINCT 'NullCount({1} TOTAL [' & [$Field] & '])', ',', FieldIndex('$Field', [$Field])))
)
See https://qlikviewcookbook.com/2020/06/data-browser-tricks/ for more including a download link for a sample qvf..
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Hi, have you tried with sth like this as your formula?
Sum(If(IsNull($Field), 1, 0))
Try this
Count({<YourField = {"=IsNull(YourField)"}>} YourField)
Or
Count({<YourField = {"=Len(Trim(YourField))=0"}>} YourField)
It gets a bit tricky to do this in a generic way without hardcoding the fieldname. The expression I've found that works is:
pick(
FieldIndex('$Field', only({1<$Table=P($Table), $Field=P($Field)>}[$Field]))
, $(=concat({1} DISTINCT 'NullCount({1} TOTAL [' & [$Field] & '])', ',', FieldIndex('$Field', [$Field])))
)
See https://qlikviewcookbook.com/2020/06/data-browser-tricks/ for more including a download link for a sample qvf..
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Hi, is there any way to use this formula also for a table like this to show the total number of null values for each table?
In your link I also saw that the user has a table in wich is shown the datatype for each field, how is it possible?
Hi @vBonini I suggest you download the sample QVF and investigate the expressions.
-Rob
Hi, I didn't found how to insert the total number of null values (in all $Table) in a single kpi.
could you help me?