Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
yogitamehta10
Creator
Creator

To handle null value

Hi All,

I have a variable.

if [Dimension]>$(variablesomevalue),'Yes','No)

my issue is Everything is coming no  all the null values are no  here . I just want real values to compare with these  variable and assign yes and no.

how I should ignore null values  here.

1 Solution

Accepted Solutions
sunny_talwar

First, is there a typo here where you are not using a parenthesis after if?

If([Fieldname]....)

Second, I am not sure I understand the complete scenario. Please provide information related to how you define your variable. Where you plan to use this expression? What are the dimensions? etc etc...

View solution in original post

16 Replies
sunny_talwar

Are you using this as a dimension? Can you share a sample?

yogitamehta10
Creator
Creator
Author

no this is just a variable i'm going to use in my expression , actually I need to count total no of yes and No.

yogitamehta10
Creator
Creator
Author

Apologies I should write

if [Fieldname]>$(variablesomenumericvalue),'Yes','No')

dan_sullivan
Creator II
Creator II

IF(IsNull(Dimension),Null,IF(Dimension> variable,'Yes','No'))

Then on your chart you can uncheck the include null values option

sunny_talwar

First, is there a typo here where you are not using a parenthesis after if?

If([Fieldname]....)

Second, I am not sure I understand the complete scenario. Please provide information related to how you define your variable. Where you plan to use this expression? What are the dimensions? etc etc...

yogitamehta10
Creator
Creator
Author

this variable will give me number of yes and No.

and in expression I have to say

count($(variable)='Yes',ID)/Count(($(variable)='Yes','No',ID)

as now in No it is including all the blank fields in sheet.

sunny_talwar

Some sample data to show how the data looks like?

yogitamehta10
Creator
Creator
Author

ID  Fieldname (numericvalue)

1      4

2      7

3      8

4

5      9

I want to say if  values in field number is greater then 4 then put yes  and if not  then put No and ignore blank values

then I need to  calculate %

Count (numberof Yes)/count(number of yes and No)

sunny_talwar

May be try this

Count(DISTINCT {<ID = {"=Fieldname > 4 and Len(Trim(Fieldname)) > 0"}>} ID)/Count(DISTINCT {<ID = {"=Len(Trim(Fieldname)) > 0"}>} ID)