Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with Missing Values

Hi,

i have this situation :

      

CD_CODEPrezzo2014Prezzo 2015Qty 2015Prezzo x Qty 2015Coverage
S0440871-13,64-12-164-€ 164
S0302446-8,76761€ 35

When Prezzo2014 is equal to '-' , I want that Coverage is equal to zero.

How can i do?

I tried with Isnull Function or Len function but doesn't work.

Thanks a lot

10 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Is Prezzo2014 = to a hyphen character, or a null? I expect the latter. Use this amended expression for Coverage:

=If(Len(Prezzo2014) = 0, 0, <existing expression for Coverage>)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunny_talwar

Are you doing this in the script or a front end chart?

Not applicable
Author

Front end Linear Table

Not applicable
Author

I have tried similar suggestions to Jonathan on the past but I have also put the expression ion the load script and set a value in a new field to either 1 or zero and then used the new field in my set analysis.  In the example below, my set analysis would be based off the value of the field 'NullCustomer'

e.g. If(Len(Trim([Customer  #]))=0,0, 1)  as [NullCustomer]

Kushal_Chawda

Create the expression for Coverage as below

if(len(trim([Prezzo2014]))=0 or [Prezzo2014]=0,0,YourExpressionForCoverage)

sasiparupudi1
Master III
Master III

what is your expression for coverage?

Anonymous
Not applicable
Author

Hi ,

try as below

if(IsNull(PREZZO2014),0,1)

avinashelite

Hi,

This is the case of missing values we cannot handle it with len or null functions . you need to handle this in the script only ..one easy solution would be go to chart Properties>Presentation> Missing symbol will be like - change it to 0.

NOTE: Try the chart presentation option if your handling the null in dimension

Not applicable
Author

I have successfully done the following in the script, which will then allow me to use set analysis

  In the example below, my set analysis would be based off the value of the field 'NullCustomer'

e.g. If(Len(Trim([Customer  #]))=0,0, 1)  as [NullCustomer]