Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

joeybird
Contributor II

Adding up dates as a number in the data load editor

Hiya

I would like the following in my data load statement...dates to add up to a total number of days ...the in the "total number of days" new column

sum(if(DateOrderCompleted) - (DateOrderReceived) as [TotalNumberOfDays],

I cant seem to crack it.

please help

Kind regards

joeybird

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Adding up dates as a number in the data load editor

Remove "if":

sum(DateOrderCompleted - DateOrderReceived) as [TotalNumberOfDays],

4 Replies
mov
Esteemed Contributor III

Re: Adding up dates as a number in the data load editor

Remove "if":

sum(DateOrderCompleted - DateOrderReceived) as [TotalNumberOfDays],

Re: Adding up dates as a number in the data load editor

Interval(DateOrderCompleted - DateOrderReceived,'DD') as TotalNumberOfDays

nico_ilog
Contributor II

Re: Adding up dates as a number in the data load editor

Hi Joanna,

Why not simply:

Date((DateOrderCompleted)) - Date((DateOrderReceived)) as TotalNumberOfDays


Lemme know.


Regards,

N

joeybird
Contributor II

Re: Adding up dates as a number in the data load editor

Hiya

awesome ta xxx

worked a treat

Kind Regards

Joeybird

Community Browser