Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Display value for null

Hi all,

Is it possible to display N for null values in a dimension?

I have a field(List) with Y and null values, on the front end I'd like to display the null values as N in a straight table, the expression if(IsNull(List),'N',List) works correctly when used as a measure however I need the column to be a dimension to allow users select values.

Any thoughts?

Capture.PNG

Thanks

7 Replies
sunny_talwar

May be this:

If(Len(Trim(List)) = 0, 'N', List)

Anonymous
Not applicable
Author

Thanks Sunny, I tried your suggestion and the null still displays as null

rohitk1609
Master
Master

Hi Ugonna,

I am attaching a sample application for you , this will solve your purpose.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Rohit Kumar



nikhilpotdar
Contributor
Contributor

Hi Ugonna,

Please add Calculated Dimension in your Dimension.

=If(len(Dimension)=0,'Null',Dimension)

Example:

=If(len(List)=0,'Null',List)

Table:

Solution2.jpg

Anonymous
Not applicable
Author

Hi Rohit,

I'm trying to implement your solution but it doesn't work with my data model, here's a bit more detail on what my data looks like;

table 1

ID , Name

A, Apple

B, Banana

C, Car

D, Doll

E, Egg

table 2

ID , List

A, Y

D, Y

Now, I need to create a table with fields Name and List, displaying N when List is null.

thank!

Anonymous
Not applicable
Author

Hi Nikhil, thanks for your suggestion.

It appears these expressions only work in QS when used as a measure, and I need the field to be a dimension to allow for user selections.

rohitk1609
Master
Master

Hi Nikhil,

Please create a new application and go to script editor and paste the below code :

table1:

load

*

inline

[

ID , Name

A, Apple

B, Banana

C, Car

D, Doll

E, Egg

];

table2:

load

ID,

If(Len(Trim(List)) = 0, 'N', List) as List

inline

[

ID , List

A, Y

D, Y

C ,

];

Now go to app overview and select drag and drop two column , ID and List and let me know if still you need anything