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: 
jleefjcapital
Creator II
Creator II

Creating measures

I just created a measure setting min and max values-

Here's the code.

Sum({$<[100% Composite Index] ={">=$(=vMin) <=$(=vMax)"}>} [100% Composite Index])

However, if there is no value, it's appearing as zero rather than null.  How do I get it to display a null value?

Thank you,

Jessica

8 Replies
sunny_talwar

Try this:

If(Sum({$<[100% Composite Index] ={">=$(=vMin) <=$(=vMax)"}>} [100% Composite Index]) = 0, Null(), Sum({$<[100% Composite Index] ={">=$(=vMin) <=$(=vMax)"}>} [100% Composite Index])

jleefjcapital
Creator II
Creator II
Author

It actually null out the field. 

sunny_talwar

If you still want to see the field, you will have to uncheck the below option on the presentation tab of properties:

Capture.PNG

I hope that will resolve your issue

Best,

Sunny

jleefjcapital
Creator II
Creator II
Author

Is this for Qlik View?  I don't have that feature in Qlik Sense...at least I don't think I do.

sinanozdemir
Specialist III
Specialist III

Hi Jessica,

On the right pane, in the data section you should be able to see options for each dimensions to show null values:

Capture.PNG

jleefjcapital
Creator II
Creator II
Author

I'm actually not interested in removing the null values.  I just want to get the null values to appear rather than the zero value.  Is this something I need to code in the measure? 

sunny_talwar

Use this expression

If(Sum({$<[100% Composite Index] ={">=$(=vMin) <=$(=vMax)"}>} [100% Composite Index]) = 0, Null(),Sum({$<[100% Composite Index] ={">=$(=vMin) <=$(=vMax)"}>} [100% Composite Index])

and then check Show null values  as Sinan Ozdemir‌ just showed.

jleefjcapital
Creator II
Creator II
Author

Additionally, when I change the aggregator from Sum to Avg, I get null values.   Is there a way to apply the average ?