Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mohiahmed
Contributor III
Contributor III

How to update a null

Hello all

I am trying to update few variables using IF, all of them update where there is a value however when there's no value I can't get the query to update the field with a comment.

Can you please help

   LOW_SEG_CDE,
If([LOW_SEG_CDE] ='DD1', 1 Default',
If([LOW_SEG_CDE] ='DD2', '2 Attested',
If([LOW_SEG_CDE] ='DD3', 'BI Default',
If([LOW_SEG_CDE] = 'null', 'Default_Depository',)))) as 'SRP_Marker', 

1 Solution

Accepted Solutions
sunny_talwar

How about try this

If([LOW_SEG_CDE] ='DD1', 1 Default',
If([LOW_SEG_CDE] ='DD2', '2 Attested',
If([LOW_SEG_CDE] ='DD3', 'BI Default', 'Default_Depository'))) as 'SRP_Marker',

View solution in original post

5 Replies
PrashantSangle

Hi,

use

isnull(FieldName) or len(trim(FieldName))=0,'Default Depositry'

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sunny_talwar

How about try this

If([LOW_SEG_CDE] ='DD1', 1 Default',
If([LOW_SEG_CDE] ='DD2', '2 Attested',
If([LOW_SEG_CDE] ='DD3', 'BI Default', 'Default_Depository'))) as 'SRP_Marker',

stigchel
Partner - Master
Partner - Master

Or use an applymap

SRP_Marker:

Mapping Load * Inline [From, To

'DD1', 1 Default',
'DD2', '2 Attested',
'DD3', 'BI Default',

];


Load ...

...
ApplyMap('SRP_Marker',LOW_SEG_CDE,'Default_Depository') as 'SRP_Marker',

....

From

Anonymous
Not applicable

Hi,

Try below code

f([LOW_SEG_CDE] ='DD1', 1 Default',
If([LOW_SEG_CDE] ='DD2', '2 Attested',
If([LOW_SEG_CDE] ='DD3', 'BI Default',  'Default_Depository',))) as 'SRP_Marker',


Thanks,

Venkata Sreekanth



mohiahmed
Contributor III
Contributor III
Author

Thank you all for your help, it was truly appreciated.