Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

weekly data comparison from same period last year

Hi I am new to power bi, and I am meaning to compare weekly data from of 2019 and 2020 for the same period. I want to have something like this table into power bi, difference of total fund sales for the time period (8/24/2019 - 9/1/2019) to total fund sales for the time period (8/20/2020-8/30/2020) same goes for columns total guests and average sales. 

 

8/24/19-9/1/19     
8/20/20-8/30/20     
      
   TotalTotalAve 
   Fund SalesGuestsSale
xyz Coffee 2019-2020 2000.24324.630092593
xyz Coffee2020-2021 700.171435.001188811
     DIFFERENCE  -1300.03-2890.989151774
      
      
abc Hutt2019-2020 30005415.545286506
abc Hutt2020-2021 1804.692866.310104895
     DIFFERENCE  -1195.31-2550.105021716

 

 
 

1 Reply

  • AllisonKennedy's avatar
    AllisonKennedy
    Icon for Community Champion rankCommunity Champion

    Anonymous  Do you have a DimDate table? If not, get one and add a WeekNumber column (or Start of Week or End of Week, or all three!) to it.

     

    Use the Week column in a table/matrix visual along with [Total Fund Sales] where

     

    Total Fund Sales = SUM(Table[FundSales])

     

    Prev Year Total Fund Sales = CALCULATE( [Total Fund Sales], DATEADD(DimDate[Date], -12, Month) )

     

    Do the same for each measure you want to display.

     

    Diff = [Total Fund Sales] - [ Prev Year Total Fund Sales]