6 Replies Latest reply on Oct 1, 2018 11:06 AM by ShivaRam Chennapragada

# How to display delta Week over Week for different years

I have a table that is displaying sales data for 2017 vs 2018. I would like to show a 3rd column that has the difference between the data year over year by week number.

Thank you.

What I have:

What I want:

• ###### 1. Re: How to display delta Week over Week for different years

Would this work?

Use "Quick Table Calc" on Shipped COGS > YOY Growth.

Hope this helps.

Best,

Shiva.

• ###### 2. Re: How to display delta Week over Week for different years

Hi Shivaram, can you do that without the percentage sign? Just one number for each column showing the actual difference

• ###### 3. Re: How to display delta Week over Week for different years

Like this?

• ###### 4. Re: How to display delta Week over Week for different years

Thanks for the response. That will not work. That is one of the approached I had used

• ###### 5. Re: How to display delta Week over Week for different years

My colleague was able to resolve this issue with the following steps:

Created 2 calculated fields:

2017 Sales (IF [year] = 2017 THEN [shipped cogs] END)

2018 Sales (IF [year] = 2018 THEN [shipped cogs] END)

In the Measure Values:

Remove Shipped Cogs

Add 2017 Sales and 2018 Sales

Manually enter a third measure values SUM[2018 Sales] - SUM[2017 Sales] which turns into an AGG()

Remove DATE(YEAR) from the columns. Add Measure Name to columns.

This achieves the original table I was looking for. See attached workbook.

• ###### 6. Re: How to display delta Week over Week for different years

Tim- Suggestion to make calcs dynamic instead of hardcoding years into the calcs,

I've modified 2018 calc to "Current Year Calc"

IF [Year] = DATEPART('year', TODAY()) THEN [Shipped COGS] END

2017 calc to "Prior Year Calc"

IF [Year] = DATEPART('year', TODAY())-1 THEN [Shipped COGS] END