Exploratory Community

How to bucket the Date data biweekly

#1

Suppose you have Sales data and you want to bucket the Order Date biweekly. Here is how.

From the column header menu of “Order Date” column, choose “Create Calculation”.

In the “Create Calcuation” dialog,

  • Choose “Overwrite Existing Column” and select “Date” column.
  • Type in the following expression in Calculation Editor.
14 * (as.numeric(Date - min(Date)) %/% 14) + min(Date)

You get the Date data bucketed biweekly starting from the oldest date in the column.

3 Likes