# Qlik Sense App Development

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

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!

LP27

Labels (4)

• ### sunny_talwar

1 Solution

Accepted Solutions
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
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

Highlighted
New Contributor III

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

Awesome! It works fine.

Thanks