Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Date difference calculation

DATE_DIFF(DATE(2024, 12, 1), TODAY()) returns 19.5k instead of 32, any clues? Thanks a bunch!

Solved Solved
0 2 192
1 ACCEPTED SOLUTION

@glencheng 

Maybe you need to use it as a dimension and not as a metric with SUM aggregation multiplying 32 by the number of rows. AVG aggregation should fix also the duplication.

I hope it helps.

Mehdi

View solution in original post

2 REPLIES 2

@glencheng 

Maybe you need to use it as a dimension and not as a metric with SUM aggregation multiplying 32 by the number of rows. AVG aggregation should fix also the duplication.

I hope it helps.

Mehdi

Hi Medhdi, using AVG solves it, thank you!! 🙌