Date difference calculation

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

@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

1 Like

Hi Medhdi, using AVG solves it, thank you!! :raising_hands: