10 Replies Latest reply on Jan 14, 2019 8:39 PM by Shinichiro Murakami

    YoY same week % change

    Puja Doona

      Hi, I'm trying to calculate the % change of % of total sale YoY for same week however I'm not able to do the correct calculation.

       

      My raw data is as below for years 2017 and 2018 where total_sales = b_sales + c_sales + etc:

       

       

      And I'm trying to get the data in the format like below that represents the YoY change for the respective week number for 'Brand b' in Shop A:

       

       

      What I've done:

       

      Previous Year's sales %-> {exclude [year] : sum(if [year]={min([year])} then ([b_sales]/[total_sales]) end)}

       

      Latest Year's sales %-> {exclude [year] :sum(if [year]={max([year])} then ([b_sales]/[total_sales]) end)}

       

      and then

       

      % change = [latest_year] - [prev_year] (because the above values are already a %. So I want the difference of only the % values above.

       

      Answers should be as below but my answer is totally different:

       

       

      Workbook attached. Can someone please help?