Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

scripting help with work days

I had a question. I have this working, but does not account for weekends and holidays in the lead time field. Do you have any suggestions? I tried making a new column in a table with this expression

networkdays (date([Putaway Date (Act.)]), date([ECC Posting Date]), $(vHolidays))

but just returns 0. Here is my script.

MappingTable:

Mapping

LOAD

    "PO Product",

    "Posting Date"

FROM [lib://Data files/ZB_Putaway.xlsx]

(ooxml, embedded labels, table is ECC);

Fact:

LOAD *,

  "Putaway Date (Act.)" - [ECC Posting Date] as [Lead Time];

LOAD Date(ApplyMap('MappingTable', "Purchase Order" & ' ' & Product & ' ' & Batch, 'N/A')) as [ECC Posting Date],

  "PO Material",

    "Purchase Order",

    Product,

    Document,

    Batch,

    "Party Entitled to Dispose",

    "Document Category",

    "Planned Time of Goods Receipt",

    "Actual Goods Receipt Date",

    "Actual Time of Goods Receipt",

    "Planned Time of Unloading",

    "Actual Unloading Date",

    "Actual Time of Unloading",

    "Planned Time of Putaway",

    "Putaway Date (Act.)",

    "Actual Time of Putaway",

    "ERP Document",

    "ERP Document Item"

FROM [lib://Data files/ZB_Putaway.xlsx]

(ooxml, embedded labels, table is eWM);

2 Replies
Anil_Babu_Samineni

Looks like applymap doesn't have fields in your mapping table. Can you link to one existing field from mapping table to the new table

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
joshrussin
Creator III
Creator III
Author

Not sure I am grasping what you mean, but here is the table.