How can I do a diff_weeks for table calculations?

Knowledge Drop

Last tested: Nov 29, 2019
 

There's no built-in diff_weeks function, so it's best to use a custom formula:

floor(diff_days(${view_name.start_date}, ${view_name.end_date)/7)

This formula simply divides the day difference by 7 and rounds down to the nearest whole number.

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:55 PM
Updated by: