Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sumitjadhav
Contributor II

how to implement null values in qlikview?

how to implement null values in qlikview?

7 Replies

Re: how to implement null values in qlikview?

sumitjadhav
Contributor II

Re: how to implement null values in qlikview?

Rather than the stated methods,is their any other method?

Re: how to implement null values in qlikview?

What do you mean with "stated methods"? What do you want to do?

- Marcus

vikasmahajan
Honored Contributor III

Re: how to implement null values in qlikview?

if( PROD_GROUP_ID = 0,1,if(ISNULL(PROD_GROUP_NAME) OR LEN(PROD_GROUP_NAME)=0,1,0)) AS IsMissingProductGrp,

This way you can check null values in script level and avoid in charts or finding where null goes wrong.

HTH

Vikas

rajeshforqlikvi
Contributor

Re: how to implement null values in qlikview?

I hope you want to handle null values what i understood from your question.

There are there ways to handle it.

1. Go to properties -> Dimension -> suppress when value is null.

2. Use ALT function on the UI level to handle the Null values.(for more details refer QlikView Help manu)

3. Use isnull() function in the script side to handle the Null values.(for more details refer QlikView Help manu)

Regards

Rajesh Kumar

rajeshforqlikvi
Contributor

Re: how to implement null values in qlikview?

Back end (Script level)

LOAD Year,

         Sales,

         if(ISNULL(Discount),1, Discount) as Discount

FROM

C:\Qlikview\AAA.xlsx

(ooxml, embedded labels, table is Sheet2);

Expression level:


Sales * Discount

Sales * Alt(Discount,2)


Hope this will help you...


Regards

Rajesh Kumar

Re: how to implement null values in qlikview?

Example in script

=if( ISNULL(Category),'NULL',Category) as Category

or

=if( len(trim(Category))<=0,'NULL',Category) as Category

In front end You can create the calculated dimension like below

=aggr(if( ISNULL(Category),'NULL',Category),Category)

or

aggr(if( len(trim(Category))<=0,'NULL',Category),Category)

Community Browser