Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load not Pulling Previous Fields

Hello,

My load statement is as follows:

NoConcatenate

GMR:

Load

*,

     [Posting Date] as CalendarDate,    

     ApplyMap('PC_Mapping', MappingKey, 'Not Mapped') as [Profit Center Desc.],

     ApplyMap('CC_Mapping', MappingKey, 'Not Mapped') as [Cost Center Desc.],

     ApplyMap('IS_Mapping', MappingKey, 'Not Mapped') as [I/S Mapping],

     ApplyMap('FS_Mapping', MappingKey, 'Not Mapped') as [F/S Mapping],

     ApplyMap('AT_Mapping', MappingKey, 'Not Mapped') as [Account Type],

     ApplyMap('FST_Mapping', MappingKey, 'Not Mapped') as [F/S Tab],

     ApplyMap('GMGL_Mapping', MappingKey, 'Not Mapped') as [GM G/L Category],

     if([Billing Type]='ZRE',Quantity * -1,if([F/S Mapping]='Sales Discounts','0',Quantity)) as [Adjusted Qty]

                              //if([Billing Type]='ZRE',Quantity * -1,Quantity) as [Adjusted Qty]

Resident BSEG2

;

Drop Table BSEG2;

For some reason when this is run the second nested "if" does not recognize the field "[F/S Mapping]" and the load fails. I have used the commented portion before and it worked fine. The "[Billing Type]" is contained in the previous tables leading to this. Any thoughts on why this wouldn't work?

Thanks

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

     if([Billing Type]='ZRE',Quantity * -1,if(ApplyMap('FS_Mapping', MappingKey, 'Not Mapped')='Sales Discounts','0',Quantity)) as [Adjusted Qty]

View solution in original post

1 Reply
m_woolf
Master II
Master II

     if([Billing Type]='ZRE',Quantity * -1,if(ApplyMap('FS_Mapping', MappingKey, 'Not Mapped')='Sales Discounts','0',Quantity)) as [Adjusted Qty]