Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Replace null dimension value with string

Hi,

In the below image i need to replace '-' with 'EMP_Not _Available' and it is an dimension and the change should reflect only that dimension alone.

1 Solution

Accepted Solutions
sunny_talwar

May be this

If(Len(Trim(If([Transaction Type]='S', If(IsNull(Employee_Name1), Lawson_EmployeeName1, Employee_Name1)))) = 0, 'EMP_Not _Available', If([Transaction Type]='S', If(IsNull(Employee_Name1), Lawson_EmployeeName1, Employee_Name1)))

View solution in original post

10 Replies
nareshthavidishetty
Creator III
Creator III
Author

Hi,

Here is the image.

Untitled.png

Thanks..

MK_QSL
MVP
MVP

What is the dimension / calculated dimension you have used?

sunny_talwar

May be like this:

If(Len(Trim(Dimension)) = 0, 'EMP_Not _Available', Dimension)

nareshthavidishetty
Creator III
Creator III
Author

Hi Sunny,

This is the dimension

=if([Transaction Type]='S',if(isnull(Employee_Name1),Lawson_EmployeeName1,Employee_Name1))

Thanks..

sunny_talwar

May be this

If(Len(Trim(If([Transaction Type]='S', If(IsNull(Employee_Name1), Lawson_EmployeeName1, Employee_Name1)))) = 0, 'EMP_Not _Available', If([Transaction Type]='S', If(IsNull(Employee_Name1), Lawson_EmployeeName1, Employee_Name1)))

nareshthavidishetty
Creator III
Creator III
Author

Thanks Sunny...awesome

MK_QSL
MVP
MVP

=if([Transaction Type]='S',

     if(Not isnull(Employee_Name1), Employee_Name1,

          If(IsNull(Lawson_EmployeeName1),'Emp_Not_Available',Lawson_EmployeeName1)))

rupamjyotidas
Specialist
Specialist

Maybe This


ALT(if([Transaction Type]='S',if(isnull(Employee_Name1),Lawson_EmployeeName1,Employee_Name1)) ,'EMP_Not _Available',)  as Empfield

sunny_talwar

Recently learnt that ALT() only work with numbers. With text, the above expression will always spit out 'EMP_Not_Available'