Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Averaging dates

Greetings,

  Is there a way to formulate out a way to find that average date from a list of dates based on topic?  For example, I want to look at all of the components that deal with system A and see what the average date of expiration is for those components?  That way I can tell my customer that they need to start getting replacements before a specific date.

Thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
Rick2Foqus
Contributor
Contributor

Every date behaves like a number on the background. The numbers before the comma correspond with the date, the numbers after the comma with the time. You need to make a number of the date first by using: NUM(Date). 

If you take the average, there will probably be some numbers behind the comma. You can remove those by the function "FLOOR". 

 

The final function you could use is:

Date(FLOOR(AVG(NUM(DATE))))

View solution in original post

1 Reply
Rick2Foqus
Contributor
Contributor

Every date behaves like a number on the background. The numbers before the comma correspond with the date, the numbers after the comma with the time. You need to make a number of the date first by using: NUM(Date). 

If you take the average, there will probably be some numbers behind the comma. You can remove those by the function "FLOOR". 

 

The final function you could use is:

Date(FLOOR(AVG(NUM(DATE))))