Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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.
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

stigchel
Partner
Partner

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

venkatasreekant
Specialist
Specialist

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

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