I have a product database with a
created and a
deleted field in datetime format.
I want to aggregate this data into a bar graph with
I have already accomplished this for one year with calculated fields:
IF DATEPART('year',[created]) = 2020 THEN 1 ELSE 0 END
IF DATEPART('year',[deleted]) = 2020 THEN -1 ELSE 0 END
IF [Created_2020] + [Deleted_2020] != 0 THEN [Created_2020] + [Deleted_2020] END
How can I do this for multiple years?