5 Replies Latest reply on Jun 22, 2018 2:15 PM by Alan Perez

# Calculate Average of January Month of each previous Year

Hi Team,

Here I have created one bar chart where data shows sales of January, February, March and April,2018.

There are 4 year data in data source.

Now I want to calculate average of January of all 4 years in First bar tooltip So that I could compare average value of all year of January month and sum value of January, 2018.

Thanks

Suman

• ###### 1. Re: Calculate Average of January Month of each previous Year

Hi Suman,

Could you share the workbook? It would be easier for me to explain you my solution with an example.

Cheers,
Jeremy

• ###### 2. Re: Calculate Average of January Month of each previous Year

Here I have attached workbook and there is one "Test" name of worksheet.

Thanks

Suman

• ###### 3. Re: Calculate Average of January Month of each previous Year

Hi Suman,

Please find attached. What I did was to create a LoD that will ignore your filter, allowing you to consider other years than your current selection.

{ FIXED MONTH([Order Date]): SUM([Sales])/COUNTD(YEAR([Order Date]))}

You will need to add more dimensions in the FIXED statement if plan on filtering on something else, or passing these as Context filter (do not use context filter on Date, this formula will no longer work as Fixed is computed after context filters).

Best regards,

• ###### 4. Re: Calculate Average of January Month of each previous Year

Hi Suman,

Was the below solution able to help you? If so, could you mark this question as 'Answered' so we keep the 'Unanswered' section clean?

Thanks,

Jeremy

• ###### 5. Re: Calculate Average of January Month of each previous Year

Hello, for what I understood you want the average of each of the months of each year and the average of all the months, I leave you an image I hope it will be useful

regards