Calculating average across two views in looker when dealing with timestamp difference

I am working with a data where I need to calculate the difference and average of  when a user is created and confirmed. The data is in two difference views.  

Example :

USER created_at -  2023-04-08 10:06:51

ACCOUNT updated_at - 2023-04-08 10:07:02

I know the difference is 11 seconds but I am trying to find the average and if its possible to do it using Table Calculation in looker.

0 2 491
2 REPLIES 2

I assume that the data is kept in different tables hence different views? You could ideally bridge then together in a “users” data model.

Anyway, if they’re separate, that’s still okay as far as Looker is concerned. Once you connect the views in an explore using “join” structure, you then need to decide in which view you will create the field that holds the value of the timestamp difference.

If you use your Users view in other places you will need to add this extra join to the view that holds the other value, otherwise you’ll get an error.

Let us know how the explore and views are currently built and we can then tell you how to implement it the best

@Dawid Thank you for replying. 

The data is kept in different views, I was able to join both in an explore. I tried making the calculations using diff_seconds as a Table Calculation and then tried to calculate the average. I am new to looker so kinda trying few things as I go.

Top Labels in this Space
Top Solution Authors