Forum Discussion

Chaucer's avatar
Chaucer
Helper II
6 years ago
Solved

Forecasting Sales

So, I want to create a table that forecasts the next 4 weeks sales by SKU. Table will look like this:     Week Commencing\ SKU    SKU A ... 11/08/2020    A   18/08/2020    B   25...
  • Sujit_Thakur's avatar
    6 years ago

    Dear Chaucer ,
    You can use following measures , just instead of years you can use week as you want to forecast sales for 3 weeks ahead Calculating Sales
    using DAX to give a Forecast by average for next year
    Image has DAX for last 3 years and forecast for next year ,you can use it for week also 
    if image is not clear 
    VAR sales_last_year = Calculate([Total Sales],DATEADD(Date[Date] , -1 ,Year)) 
    Such more 2 measures for calculating Sales for 3 years then 
    use
    return 
    Divide all three variable (lastyear,2years back,3 years back) by 3 you will get forecast for next year 
    remeber you need to replace years by week 


    For more info you can check video which will help you a lot 
    https://www.youtube.com/watch?v=vq3VOERJw7s

    I would expect a kudos .
    and if this helped getting close to your solution accept it as a solution

    if any further help required please let me know , i think you can nail this problem with my recommended youtube video.

    Regards ,

    Sujit Thakur 

  • Chaucer's avatar
    6 years ago

    Thanks all for your help.

    Using a combination of the links you guys added I knocked this up which works a treat. If i could select all as solution I would!

    Forecast Pallets =
    VAR
    PalletsLY = Calculate([Total Pallets],DATEADD( Dates[date],-1,year))
    VAR
    Pallets2Y = Calculate([Total Pallets],DATEADD( Dates[date],-2,year))
    VAR
    Prior3WeeksPallets = calculate ([Total Pallets],datesbetween(Dates[Date],Today()-22,Today()-1))

    Return
    Divide(PalletsLY + Pallets2Y + Prior3WeeksPallets,5,0)