Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ivanaksen
Contributor III
Contributor III

Transfer calculation date for the next period

Hello everybody,

Please advise with one question.

I need to set condition for vendors which starts with "2000",

So the main condition that they have payments only on last Wednesday of the period (we have list of  finance periods in separate file).

And the point is, that all periods finish on Monday. For example Period 6 is from 30.05.2018 to 30.07.2018.

And if the Net Due Date of the vendor is less than the last Wednesday, it`s not problem.

But if it`s going after Wednesday and before Monday-it should be transferred to the next period`s last Wednesday.

So last condition is the problematic one, bellow is the formula. Please advise how it`s better to change  in script to have necessary data.

Thanks in advance

Date(if(left(LIFNR,4)='2000' and NetDueDate<=PeriodEnd_NDD-5,PeriodEnd_NDD-5,

If(left(LIFNR,4)='2000' and NetDueDate>PeriodEnd_NDD-5 or NetDueDate<=PeriodEnd_NDD,Month(AddMonths((NetDueDate),+1)) and (PeriodEnd_NDD-5),) as  NetDueDate_Calc1

0 Replies