Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement < date in load editor

Hello,

I am having trouble with this if statement in the load editor.

Here is an excerpt from my script:

[_Onesheet_churn]:

LOAD

monthname("Original Order Date") as [original_order_date]

FROM onesheet_churn

[_Add_Order_date_churn]:

Load

monthname(if((original_order_date)<monthname('2011/4/18'), monthname(makedate(2011,4,18)), original_order_date)) as [churn_order_date]

Resident _Onesheet_churn

The result is that my dates prior to "2011/4/18" are not converted to "2011/4/18," the dates are showing up in their original form.

What I need is "if(original_order_date)<(2011/4/18) then change the date to (2011/4/18) , else [original_order_date] as [churn_order_date]

Any help is much appreciated!

1 Solution

Accepted Solutions
MVP
MVP

Maybe something like

monthname( RangeMax( original_order_date, Makedate(2011,4,18) ) ) as [churn_order_date]

View solution in original post

3 Replies
MVP
MVP

Maybe something like

monthname( RangeMax( original_order_date, Makedate(2011,4,18) ) ) as [churn_order_date]

View solution in original post

Master
Master

Or

[_Onesheet_churn]:

LOAD

monthname("Original Order Date") as [original_order_date]

FROM onesheet_churn

[_Add_Order_date_churn]:

Load

monthname(if((Num(original_order_date))<Num(monthname('2011/4/18')), monthname(makedate(2011,4,18)), original_order_date)) as [churn_order_date]

Resident _Onesheet_churn

Not applicable

this did the trick thank you!