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

Creating new field depending on 3 more fields from source

Hello All,

Can some help in creating a new field Closeouts with close out and Excl Close out values depending on below condition in the Picture

If closeout number has null begin date and end date the number should always falls under closeout

If closeout number has begin date would like to show that number under close out starting that date

if it has both begin and end date the number should fall under close out other then this condition everything should fall under excl close out

Test12.png

Labels (4)
5 Replies
Sue_Macaluso
Community Manager
Community Manager

Hi, What product are you using QlikView or Sense? I would like to move it to the appropriate product forum. Thanks
Sue Macaluso
dseelam
Creator II
Creator II
Author

Hello Sue,

Its Qlikview

pradosh_thakur
Master II
Master II

Hi

 

The wordings was bit ambiguous. I am just writing a if clause , you jsut need to change the comments to what ever you desire

if(len(trim([Begin Date]))=0 and len(trim([End Date]))=0,'Closeouts',if(len(trim([End Date]))=0, 'Begining ' & [Begin Date] &' continuing ' ,'closed out during the time frame' &  [Begin Date] & [End Date]))

Please check for the field names case sensitivity.

 

Regards

Pradosh

Learning never stops.
dseelam
Creator II
Creator II
Author

Thanks Pradosh,

 

Using your code took me some where but below code stuck my mind, it came with no errors but not deriving any results on front end 

this is some thing am looking for but not derived results I need 

 if(len(trim(date([Begin Date])))=0 and len(trim(date([End Date])))=0 ,
if(len(trim(date([Begin Date])))>0 ,
if(len(trim( date([Begin Date] and date([End Date]>0)))),'Closeouts' ,'Excl Closeout'))) as Closeout

 

source data 

Capture.PNG

 

pradosh_thakur
Master II
Master II

You didn't exactly used my expression. I am attaching the qvw . Please use it.

Learning never stops.