Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have this situation :
CD_CODE | Prezzo2014 | Prezzo 2015 | Qty 2015 | Prezzo x Qty 2015 | Coverage |
S0440871 | - | 13,64 | -12 | -164 | -€ 164 |
S0302446 | - | 8,76 | 7 | 61 | € 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
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>)
Are you doing this in the script or a front end chart?
Front end Linear Table
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]
Create the expression for Coverage as below
if(len(trim([Prezzo2014]))=0 or [Prezzo2014]=0,0,YourExpressionForCoverage)
what is your expression for coverage?
Hi ,
try as below
if(IsNull(PREZZO2014),0,1)
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
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]