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: 
My_Rebecca
Creator
Creator

Only first month is calculated. How to enable all dates calculated?

Only the first month data is calculated, what is the root cause? How to enable all dates calculated?

TJGRMap1:
Mapping Load
"GR Number",
"Truck arrival"
FROM [lib://FLD_DI_LOG_Reporting/Control Tower DC Report/DC TJ/GR/3PL/inbound report_*.xlsx]
(ooxml, embedded labels, table is PTO);

LOAD*,
if(hour([Truck arrival])>=15,-1,0)+NetWorkDays([Truck arrival],[Posting Date],)-1 as "GR_Net Working Days";

Load*,
if(IsNull(if(hour([Truck arrival])>=15,-1,0)+NetWorkDays([Truck arrival],[Posting Date])-1),'Factory Direct Delivery',if((if(hour([Truck arrival])>=15,-1,0)+NetWorkDays([Truck arrival],[Posting Date])-1)>0,'Late','On-time')) as "GR_On-time/Late";


LOAD
"Material Document" as "GR Number",

......
"Posting Date",
......
Date(ApplyMap('TJGRMap1',"Material Document", null()), 'YYYY-MM-DD h:mm:ss') as "Truck arrival"

......
FROM [lib://FLD_DI_LOG_Reporting/Control Tower DC Report/DC TJ/GR/SAP/DC*.XLSX]
(ooxml, embedded labels, table is Sheet1);

My_Rebecca_0-1679285507890.png

 

Labels (1)
4 Replies
G3S
Creator III
Creator III

pls try:

if(
IsNull(if(hour([Truck arrival])>=15,-1,0)+NetWorkDays([Truck arrival],[Posting Date])-1),'Factory Direct Delivery',

if(if(hour([Truck arrival])>=15,-1,0)+NetWorkDays([Truck arrival],[Posting Date])-1)>0,'Late','On-time') as "GR_On-time/Late"

My_Rebecca
Creator
Creator
Author

Thanks, yet it does not work.

marcus_sommer

Your mapping-table is created with a wildcard-load. Within the most scenarios it won't lead to a concatenated mapping-table else each load creates a separate mapping-table which are automatically suffixed with table-name-n (unfortunately you couldn't see them within the data-model - only the document-log hints to it).

Therefore I suggest to pre-load the data at first and loading from it the mapping-table, like:

t: load * from Path/Excel*.xlsx (...);
m: mapping load Lookup, Return resident t;
drop tables t;

My_Rebecca
Creator
Creator
Author

Yes, you're right. I realize it same as your method, thanks.