Qlik Community

Qlik Sense App Development

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

LP27
New Contributor III

how to take maximum of date field in Qlik sense

Hi Everyone,

I have got scenario to calculate open days with 2 dates field.

Notification 

Created Date

Completion Date

Open Days

123

1/4/2018

1/5/2018

 

456

1/4/2018

1/13/2018

 

123

1/4/2018

1/16/2018

 

 

Now I want logic - 

Example - 

For Notification Field value - 123, it should take maximum of Completion Date field and then it should do = (Max(completion date) - Created date))

So this is the desired  output -

Notification

Created date 

Completion date

Open days

123

1/4/2018

1/5/2018

12 

456

1/4/2018

1/13/2018

9

123

1/4/2018

1/16/2018

12

 

Could some one explain what need to be done to get the output?

This should be easy but i am new to Qlik Sense! 

Thanks in advance,

LP27

1 Solution

Accepted Solutions
Highlighted
mato32188
Contributor III

Re: how to take maximum of date field in Qlik sense

Hi,

try to use 

sum(aggr(NODISTINCT max([Completion date]),Notification)-[Created date])

for your expression in straight table with Notification, Created date, Completion date as dimensions.

Hope it helps.

BR

Martin

2 Replies
Highlighted
mato32188
Contributor III

Re: how to take maximum of date field in Qlik sense

Hi,

try to use 

sum(aggr(NODISTINCT max([Completion date]),Notification)-[Created date])

for your expression in straight table with Notification, Created date, Completion date as dimensions.

Hope it helps.

BR

Martin

LP27
New Contributor III

Re: how to take maximum of date field in Qlik sense

Awesome! It works fine.

Thanks