Add up all the tickets for each month across different years

Hey,
Is there a way for us to add all tickets that were created for each month across different years, for example, adding Jan 2020, Jan 2021 and Jan 2022

Hi @athe,

The eazyBI data cube only has one Time dimension.

​There are generally two options to show issues created in each month and year as rows and columns

​1) You might put either each month or each year in a separate measure to be used together with the default Time dimension.
​You might filter out the current year and put the Time dimension month level on report rows.
​Then, click on the measure name in the table header and select to add standard calculation Add calculated->Time ago->Year ago
Create reports
Then, you might copy the expression of that calculation and save in a separate measure like "2023 created"​

Generally, the expression behind that calculation is as follows:

Aggregate(
  CalculatedChildrenSet([Time].CurrentHierarchyMember),
  (
    [Measures].[Issues created],
    [Time].CurrentHierarchyMember.Level.DateMember(
      DateAdd('yyyy', -1, [Time].CurrentHierarchyMember.MiddleDate)
    )
  )
)

You might change the figure in line 6 to get the calculation for two or three years ago.

​​An alternative idea is to hard-code the month within measure and use the year level of Time dimension report rows.
The expression for the "Jun"​ might be as follows.

(
--the measure to be used
  [Measures].[Issues created],
--addressing the month
 [Time].[Month].DateMember(
 DateAdd(
  --time unit to be added
   "m",
  --number of units to be added (0 for Jan 11 for Dec)
   5,
  --date to be used as starting point
   [Time].CurrentHierarchyMember.StartDate)
  ) 
 )

​2) You might import the issue creation month and year as separate JavaScript calculated dimensions.
​You might read more about that here - New calculated fields

​The code for the “Creation year” might be as follows.

var d = new Date(issue.fields.created);
return d.getFullYear();

​And for the creation month (as a string):

var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var d = new Date(issue.fields.created);
return monthNames[d.getMonth()];

This will import the month as string. Unfortunately, they will be generally ordered alphabetically, so you might have to re-order them within a calculated member using the Aggregate function - Aggregate.

​regards,
​Oskars / support@eazyBI.com