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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pra_kale
Creator III
Creator III

Concatenation of Date..help required

Hi,

Attached is the excel sheet in which Effective date column contains only Day part where as Transaction Date contains complete date.

I want to set a condition as given below..

If effective Date is > 0 then final date will be day from effective date column and month and year from Transaction date column.

But if effective date is <0 then final date is = to Transaction date.

for e.g. for policy number 123456 Transaction date will be 15/06/2016..

           for policy number 9876 Transaction date will be 01/10/2016.

where as for other policy numbers Final Date will be Transaction Date as effective date is <0...

Thanks in Advance.

1 Solution

Accepted Solutions
sunny_talwar

This may be?

A:

LOAD Policynumber,

    Effective_Date,

    TransactionDate,

    Date(If(Effective_Date > 0, MonthStart(TransactionDate) + Effective_Date-1, TransactionDate)) as Final_Date

FROM

[Test2_16112016.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

2 Replies
sunny_talwar

This may be?

A:

LOAD Policynumber,

    Effective_Date,

    TransactionDate,

    Date(If(Effective_Date > 0, MonthStart(TransactionDate) + Effective_Date-1, TransactionDate)) as Final_Date

FROM

[Test2_16112016.xlsx]

(ooxml, embedded labels, table is Sheet1);

pra_kale
Creator III
Creator III
Author

Thanks Sunny..It's working.