Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Include Null Values Setting in Charts, equivalent for a formula?

Hello,

In a bar chart I am counting my Customers per Dimension. In this bar chart I am using the "Include null values" Setting (it is unticked) which can be found under "Dimension".

In a textbox / KPI I also would like to count my customers. Unfortnately there is not such a setting to include / exclude null values. This means both figures are not matching :(.

Do you know how to achieve, that in a expression / formula the null values are not taken into consideration?

Thanks for your help,

 

chriys

3 Replies
lorenzoconforti
Specialist II
Specialist II

It depends on whether values are null or blank; add set analysis to your KPI

{<Value -= {""}>}

Or

{<Value = {"*"}>}

Kushal_Chawda

-> With NULL values, you can simple count the overall customers like below

=count(distinct CustomerID)

-> If you want to count the values excluding NULL for specific dimension, you can use something like below

=count(distinct {<Dimension={"=len(trim(Dimension))"}>}CustomerID)

chriys1337
Creator III
Creator III
Author

Hello Krush, 

 

can you please explain your Set analysis formula?

 

"=count(distinct {<Dimension={"=len(trim(Dimension))"}>}CustomerID)"

 

I would think that  =len(trim(Dimension)) just gives back the length of the Dimension? thank you