Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
LP27
Creator II
Creator II

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

Labels (1)
1 Solution

Accepted Solutions
mato32188
Specialist
Specialist

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

ECG line chart is the most important visualization in your life.

View solution in original post

2 Replies
mato32188
Specialist
Specialist

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

ECG line chart is the most important visualization in your life.
LP27
Creator II
Creator II
Author

Awesome! It works fine.

Thanks