Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

soniasweety
Contributor III

Replace to zero

hi all,

I have a pivot table  with the measure result is showing as null symbol

but I want to show as zeros in place of nulls

I tried different methods  but no luck

Dim:group

columnSmiley Very Happyate

Mesaure: groupvalue

tried

if(groupvalue='-' or isNull(groupvalue),0, groupvalue)

Thanks

sony

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Replace to zero

Is it null or is it missing.... I think it would not be possible to replace missing value with 0 in the chart itself. In order to do this you would probably need to generate missing data in the script

Generating Missing Data In QlikView

9 Replies
devarasu07
Honored Contributor II

Re: Replace to zero

Hi,

try below methods,

Method 1:

if(Len(groupvalue)<=0 or IsNull(groupvalue) or groupvalue='-',0,groupvalue)

Method 2: // best approach

Alt(Sum(groupvalue), 0)

Method 3: // best approach

try to define null variable like below

NULLASVALUE *;

SET NullValue ='NULL' ;

or

SET NullValue ='-' ;


Still if you have issue, i would suggest you to provide the sample mock data and expected output. Thanks


Hope this helps to you


Regards,

Deva

arulsettu
Honored Contributor III

Re: Replace to zero

try this

if(isnull(groupvalue),'0',groupvalue)

soniasweety
Contributor III

Re: Replace to zero

not working

soniasweety
Contributor III

Re: Replace to zero

not working

devarasu07
Honored Contributor II

Re: Replace to zero

Hi,

share you mock app or sample data with expected output. that would be easy for us to check and help you

pradosh_thakur
Valued Contributor III

Re: Replace to zero

All Solutions by Deva should work. if "group value" is a field then [groupvalue] if it is a label than replace group value with the expression.


if(len(trim(groupvalue))>0,groupvalue,0)

soniasweety
Contributor III

Re: Replace to zero

it also not working

and the filed having  number values

pradosh_thakur
Valued Contributor III

Re: Replace to zero

all of the above solution should work unless we are missing something that is in the app. please post a sample . dummy data also will do .

MVP
MVP

Re: Replace to zero

Is it null or is it missing.... I think it would not be possible to replace missing value with 0 in the chart itself. In order to do this you would probably need to generate missing data in the script

Generating Missing Data In QlikView