Turning monthly activity into monthly YTD activity

Hi all, I currently have monthly activity and would like to turn it into Year to date(YTD) monthly activity(ex. Feb YTD activity = Jan activity + Feb activity). Ideally, I will add calculated fields for each month’s YTD activity, but I’m not sure what formula I should use. Any help is appreciated


If you have a date column, say Ref_Date, in the dataset calc field like below can be tried,

ifelse( ( Ref_Date >= date_trunc(‘year’, current_date) and Ref_Date <= current_date ), Activity_calculation )

1 Like