Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Payment schedule table

Hi guys,

I have the following script to create a payment schedule based on start and end date and it is working perfectly.

LOAD 

    ExpenseId,

    ExpenseStartDate,

    ExpenseEndDate,

    if(ExpenseFrequency ='Annually', Date(MonthStart(ExpenseStartDate)),

         Date(MonthStart(AddMonths(ExpenseStartDate,iterno()-1)),'YYYY-MM-DD')) as [Payment Date],

    ExpenseFrequency,

    Resident tblExpenseSchedule

while ExpenseEndDate >  MonthStart(addmonths(ExpenseStartDate,iterno()-1));

Now I want to add to the if statement when the frequency = semi annual and when it is quarterly.

as you see above when frequency = yearly it shows the date and when monthly it increae the date by one month untill reaching the date end.

Anybody knows what should  type in the if statement to make the payment date increases by 6 month when the frequency = Semi and increases by 3 months when it is qurterly.

Thxs in advance,

Alec

Labels (1)
0 Replies