Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MagnusS
Contributor
Contributor

Generic date with conditions

Hi,

I have a problem which I cant find a solution to which I hope you can help me with.

I have a financial qlikview report which has a datamodel with fact table on invoice level, each row shows several dates - invoicedate, paiddate, paymentbatch date. The facttable also has a flag showing invoicetype (Open, Paid).

Request is to create a new Report Date which should have conditions:

If InvoiceType = OP, then PaymentBatchDate <= ReportDate

If InvoiceType = PP, then InvoiceDate <= ReportDate and PaidDate >=ReportDate

I have created a DateLink table with the different date fields and connected it to a Master Calender, so I have a generic Date which we can call ReportDate. The problem I face is how I can apply the conditions to this Report Date? I tried with set analysis, but do not get it to work. I would prefer to create the conditions at script level so I can apply time relative measures on Report Date. 

Any ideas?

0 Replies