Showing actuals and forecasts in the same chart with Power BI

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • In budgeting reports, a common requirement is to show future sales forecast and actual sales volume on the same line chart. Learn how to achieve this goal using DAX.
    Article and download: sql.bi/73386?a...
    How to learn DAX: www.sqlbi.com/...
    The definitive guide to DAX: www.sqlbi.com/...
  • НаукаНаука

Комментарии • 113

  • @aatsw
    @aatsw 3 года назад +23

    These short videos are extremely helpful and time-efficient, much better than long videos. Please keep them coming. Thanks!

  • @CaCalegarii
    @CaCalegarii 3 года назад +3

    I am not used posting comments in videos, but you are simply the best!
    What an easy and straight forward explanation.
    Thank you!!!

  • @RACHIMSAJA
    @RACHIMSAJA 3 года назад +9

    It really makes more clear to me on when to use removefilters and keepfilter. Thanks for the great videos!🙏

  • @andresramirezortega6218
    @andresramirezortega6218 Год назад +1

    This is the only video on RUclips that is worth watching when it comes to Rolling Forecast! Thank you very much

  • @mehdihammadi6145
    @mehdihammadi6145 3 года назад +4

    Another great example on how to use remofilters and keepfilters. thank you for sharing

  • @sarris2412
    @sarris2412 3 года назад +13

    Alberto, you are the best! No matter how much time it takes but I am confident that this channel will reach million subscribers without a doubt...Best wishes

  • @NaraMeerammaTrust
    @NaraMeerammaTrust 3 года назад +4

    Alberto, you are doing extraordinary job. No words to express our happiness. helping us a lot in our day to day work on Power BI. Once again thanks a lot. I am a big fan of you and your videos.

    • @SQLBI
      @SQLBI  3 года назад

      Our pleasure!

  • @evedickson2496
    @evedickson2496 3 года назад +1

    Brilliant... I've only watched a couple of videos but there are already making my life a lot easier... Thank you

  • @siddheshamrutkar8684
    @siddheshamrutkar8684 2 года назад +2

    It's truly an amazing video.. Thinking in the similar and same direction but get stucked sometimes but you look very simple don't know how but definitely it requires sheer concentration, dedication, hard work and more importantly understanding of the requirement from business perspective.. Superb.. 🤟👍

  • @dchapman74055
    @dchapman74055 Год назад +1

    Got my formula to work but have to manually update the last date each month, but this definitely helped.

  • @harryhai3116
    @harryhai3116 3 года назад +1

    Thank you. I have been learning from your book and more for 4 months. Very helpful. Merry Christmas.

    • @SQLBI
      @SQLBI  3 года назад

      Thanks - Happy Holidays!

  • @Bharath_PBI
    @Bharath_PBI 3 года назад +1

    Neat way to use remove filter and keep filter functions. Thank you 👍

  • @borismario
    @borismario 3 года назад +1

    Amazing ! I learn too much with the DAX formulas shown.

  • @suki9860
    @suki9860 2 года назад +1

    Very useful, Alberto. Thanks very much!

  • @afdarizki
    @afdarizki Год назад +1

    Awesome! Thanks a lot for the guidance!

  • @scotttokaryk3714
    @scotttokaryk3714 3 года назад +1

    Thank you. I need that this afternoon!

  • @ymohamed3154
    @ymohamed3154 Год назад +2

    Great video. Can you please make us a video of how you calculated the forecast. Thanks

  • @Granty707
    @Granty707 2 года назад +1

    Brilliant video. Really helped me out at work 😀

  • @PSModelling
    @PSModelling Год назад

    This may not be exactly what you're looking for but the COALESCE function can merge two measures overriding any blanks with values from the other measure.

  • @GentilOliveira
    @GentilOliveira 3 года назад +3

    Thanks for share a great content with us.

  • @RakeshSaha1705
    @RakeshSaha1705 3 месяца назад +1

    Nice and super explaining.

  • @judeLondon
    @judeLondon 3 года назад +1

    Great stuff again Alberto. Many thanks

  • @pietman1000
    @pietman1000 2 года назад +1

    This guy is a BI master

  • @zeisslaimen1
    @zeisslaimen1 3 года назад +1

    merry christmas, SQLBI guys! take good rest, relax :)

  • @felipesignorellireis7839
    @felipesignorellireis7839 3 года назад +1

    from Brazil. Great video.

  • @aryansinanan9878
    @aryansinanan9878 3 года назад +1

    Great stuff as per usual. Best Christmas present :).

  • @gilbertosegoviano7701
    @gilbertosegoviano7701 2 года назад +1

    You are amazing, thanks for sharing

  • @travelkare
    @travelkare 10 месяцев назад +1

    Thanks a ton ! Alberto !

  • @marcnichols164
    @marcnichols164 Год назад +2

    What do you do if you do not have the forecast, how do you calculate the measure?

  • @gabrielmorais7312
    @gabrielmorais7312 3 года назад +1

    Awesome. Thanks Alberto!

  • @mehdifadhli6413
    @mehdifadhli6413 3 года назад +1

    Very helpful thank you Alberto!

  • @suziearnold7585
    @suziearnold7585 2 года назад +4

    This is a great video. A scenario I have been trying to solve is when we reforecast each month but do not want to over ride prior months data so we can tell- are we getting better at forecasting ?

  • @dariuszspiewak5624
    @dariuszspiewak5624 3 года назад +6

    Alberto... one person has given you a thumbs-down. They must have had a bad day, I guess :) Thanks for the video.

  • @ck2610
    @ck2610 4 месяца назад +2

    how can ich calculate the forecast total sum for the last Actual Sales Period?

  • @BbabbittGolf
    @BbabbittGolf 8 месяцев назад +1

    Great video! I would love to see the measure used to create the forecast!

    • @SQLBI
      @SQLBI  8 месяцев назад

      Download the sample file following the instructions in the description. However, the forecast here is just fictitious, it's not the value of the article!

    • @BbabbittGolf
      @BbabbittGolf 8 месяцев назад

      Thank you!
      Also, how would your remaining forecast calculation change if the sales table had two dates to work off of - sales date & order date for example?
      @@SQLBI

  • @wmfexcel
    @wmfexcel 3 года назад +7

    Thanks for the step by step demonstration. It helps a lot in understanding the filter context! :)
    Btw, shall the formula be 'Date[Date] '> LastDateWithSales so that last date of actual sales will not be included?

    • @SQLBI
      @SQLBI  3 года назад +3

      You're right, thanks for catching it!
      Indeed, it was already correct in the article and in the demo file you can download, it was a typo in the recording.

    • @Datanometrics
      @Datanometrics 2 года назад +1

      Noticed this, thanks for sharing

  • @anuragbawankar685
    @anuragbawankar685 3 года назад +1

    great content.... Thanks a lot !

  • @vilmarsantos3419
    @vilmarsantos3419 3 года назад +1

    Conteúdo sempre da melhor qualidade. Obrigado por partilhar

  • @VladMZ
    @VladMZ 3 года назад +1

    Extremely useful!

  • @NoShadowOfDoubt1
    @NoShadowOfDoubt1 3 года назад +1

    Beautiful, thank you.

  • @Milhouse77BS
    @Milhouse77BS 3 года назад +1

    Thank you. Just wondering how to do this yesterday, after trying to add a What If measure to create a forecast amount.

  • @sbn4862
    @sbn4862 2 года назад +1

    Very best method, i tried did such chardboard with IF functions, Thank you!!!
    LastDateWithSales is varable and if even I use All modificator in varable it owerwrites all filter contexts whatever?

  • @jameszhou162
    @jameszhou162 3 года назад +1

    great example. but in majority of cases, forecast is done on Monthly level rather on daily. so i guess it would be only possible to use day extrapolation to combine remaining sale forecast to actual.

    • @SQLBI
      @SQLBI  3 года назад

      You can do a dynamic allocation as explained here:
      www.daxpatterns.com/budget/

  • @oricchannel2811
    @oricchannel2811 3 года назад +1

    Thanks for the christmas gift !

  • @semihfndkc6993
    @semihfndkc6993 Год назад +1

    Hi, how have you calculated forecast column?

  • @BrunoSilva-nj7gy
    @BrunoSilva-nj7gy Год назад +1

    Great video! Thank you for sharing your knowledge! I was wondering if it is possible to link it to a month/year slicer. The behaviour I need is; if I filter for Jun/2023 I would see actual sales from Jan to Jun 23 and Forecast from Jul to Dec 23. Is it possible, regardless the current date? Thank you in advance.

  • @mariabardales
    @mariabardales 3 месяца назад

    Hello, thank you for the video, how have you calculated forecast measure?

  • @shatakshiagrawal3062
    @shatakshiagrawal3062 3 года назад +1

    Thank you so much

  • @mshparber
    @mshparber 3 года назад +1

    Excellent!!!

  • @md.mohiuddinchowdhury8021
    @md.mohiuddinchowdhury8021 6 месяцев назад +1

    what is the DAX for forecasting?

  • @vineetyoutubr5
    @vineetyoutubr5 3 года назад +1

    You are god of DAX 🙏🏿

  • @wexwexexort
    @wexwexexort 3 года назад +1

    Nice trick!

  • @aashisehrawat
    @aashisehrawat 2 года назад +1

    Amazing, can we also do this if I need to add legends in the line chart? For instance, showing revenue for 3 business units and highlighting forecasts by dotted lines?

  • @RTSWatson
    @RTSWatson 3 года назад +1

    Thank you - I don't understand how the budget table knows to split by the relevant month as it does not have a month field.

    • @SQLBI
      @SQLBI  3 года назад

      The Forecast measure performs a dynamic allocation by month based on sales of the previous year. That part is not described neither in the video nor in the article. You can find the formula in the sample file you can download from the article page. A more complete description of the allocation technique is available here: www.daxpatterns.com/budget/

  • @gabriellegall8278
    @gabriellegall8278 2 года назад +1

    Thanks for the video ! Very insightful
    What if we want to have 2 measures, e.g. if we want to show the forecast in dotted line and the sales in a solid line ?
    Should I just split the combined measure into two measures using IF ? or if there a better solution

  • @pthapa55
    @pthapa55 10 месяцев назад

    Can you please share how you calculated the Forecast? Thank you!

  • @giri41
    @giri41 3 года назад

    Please do a video on how to calculate top Quartile and bottom Quartile performance

  • @ashishmohan4707
    @ashishmohan4707 3 года назад +1

    Hi Alberto
    Mary christmas
    and very very happy return of the day
    wish you a very happy birthday.

  • @gargierawatt
    @gargierawatt 7 месяцев назад

    Great video however can someone help me out explain how did the remaining forecast number for Aug came up to what it shows on the screen Many thanks

  • @ekanayake1
    @ekanayake1 2 года назад

    Hi Alberto. Great video. In the same example what would be the best way to have a note to say which are Actual Figures and which are forecast. Probably as a heading against the month. Thank you in advance.

  • @yashjoshi9083
    @yashjoshi9083 3 года назад +1

    WONDERFUL !!!

  • @oconnorra
    @oconnorra Год назад

    Thank you so much for explaining so clearly! I have a similar but different scenario with targets and actuals, but no date! Just an index. if i attempt this, i get teh first part right, but not the second:
    Remaining Expected Steps =
    VAR LastLegalStep =
    CALCULATE(
    MAX( FactFiles[LegalSubStepIndex] ),
    FILTER( DimCurrentStep, DimCurrentStep[Legal Step] = "Current"))
    VAR RemainingLegalSteps =
    CALCULATE(
    [Expected Days],
    KEEPFILTERS(FactFiles[LegalSubStepIndex] >= LastLegalStep)
    )
    RETURN
    RemainingLegalSteps
    Can you point me in the right direction?

  • @omardaraz1027
    @omardaraz1027 Год назад +1

    hi Alberto, i think it would be not good to ask but still want to know how u determind or create forecast column. i have sale data so how can i say this would be my forecast. please help

  • @asn85uk
    @asn85uk Год назад

    Ola Senyor, where you are getting forecast from ? From a planning tool or there is a way to do it in power bi ?

  • @SatvikChauhan-h6l
    @SatvikChauhan-h6l Год назад

    Can you please explain [Forecast] measure, without this how can I write RF measure.
    please explain it.

  • @CarlosEspinoza-me9oi
    @CarlosEspinoza-me9oi 3 года назад

    Amazing! Could it works for a daily forecast? I need it for a current month daily, but some different. Example the 1st day (mon, tue, wed...etc) of current month versus the 1st day (mon, tue, wed...ect) from the month last year. Ex: Thu 01, Jul 2021 vs Thu 02, Jul 2020; Fri 02 Jul 2021 vs Fri 03 Jul 2020 and so on.

  • @olemew
    @olemew Год назад

    In this use case, goal is to go from 2:10 to 2:25 visualization.

  • @narendrakumar-im7en
    @narendrakumar-im7en Год назад

    Can we add a legend as well to this graph?

  • @cucotorres
    @cucotorres 3 года назад

    Hi Alberto. Thanks for this video. But i have a doubt, which visual are you using? Because I'm using line chart and can't do that.

  • @totvabe1
    @totvabe1 3 года назад +1

    Great!

  • @vedikatrivedi2019
    @vedikatrivedi2019 Год назад

    Hello, How do I make the forecast column ?

  • @userasdf1546
    @userasdf1546 Год назад

    I wish you would tell us what hotkeys you are pressing at 7:00. I can't get my forecast column to show up :(

    • @userasdf1546
      @userasdf1546 Год назад

      Nevermind. I had to create a measure and call the measure instead of the column.

  • @3danim8r1
    @3danim8r1 3 года назад +1

    Great ....

  • @riazuddin7493
    @riazuddin7493 3 года назад

    I have a column in my table name reason for leaving and based on that I want to add another column which is Volunteer attrition or Involunteer attrition i.e. if reason for leaving for an employee appears as Retired then the new column should show Involunteer attrition whereas for resignation it should show as volunteer attrition. Can you help me add this column please? Also how can I calculate the percentage of volunteer and involunteer attrition based on the total attrition for the whole year which is 1157.

  • @rosev.7778
    @rosev.7778 Год назад

    What is the Dax for forecast in the var remainingforecast

  • @anuragbawankar685
    @anuragbawankar685 3 года назад

    Why am I getting values in actual sales after the max date i.e. Today date ?????? (in my project) what could be the reason?

  • @shrikantthakur7127
    @shrikantthakur7127 2 года назад

    Hi How to create Forecast DAX can you share

  • @lionels839
    @lionels839 Год назад

    Hello Alberto. I love what you do. One dumb question please: my power pivot version does not include REVOMEFILTERS. How can I replace it in your book DAX Patterns?

    • @SQLBI
      @SQLBI  Год назад

      You can use ALL instead of REMOVEFILTERS. The samples are available also for Excel and they use that.

  • @jurgenguns1925
    @jurgenguns1925 3 года назад

    Hi Alberto, you can explain these trainings as the best!
    But how to handle if the last date of Sales is always the month? Within my data of sales I have only month period...

    • @SQLBI
      @SQLBI  3 года назад

      It should work the same for the future months...

    • @jurgenguns1925
      @jurgenguns1925 3 года назад

      @@SQLBI Yes, for future months result is the same however, his calculation for last month sales will always be complete month and not day of date. So he includes the totale of running month in the forecast.

    • @jurgenguns1925
      @jurgenguns1925 3 года назад

      In practice it should measure the diff of the first forecast month and the actual sales of that month to have the remaining value of the running month.

    • @SQLBI
      @SQLBI  3 года назад +1

      But if the date is always at the end of the month, how is it possible to know what are the dates covered by the data available?

    • @jurgenguns1925
      @jurgenguns1925 3 года назад

      @@SQLBI because I'll receive daily new data report with new sales figures and they are collected by period. (Example period 202101)

  • @sekousoro6309
    @sekousoro6309 3 года назад +1

    Great

  • @clovissantiago2195
    @clovissantiago2195 3 года назад

    How can i get the original measure forecast to calculate and combine the values after? Someone help me? Thanks.

    • @nicholaskeogh1121
      @nicholaskeogh1121 2 года назад

      did you ever figure this out? seems like its a pivotal measure for this to work but i can't find where he's created it.

  •  3 года назад +1

    Hey its Xmas. Please do not post Videos in the silent time. Even that all are usually great! Spend time with your family and relax!

  • @roxanarodriguez1828
    @roxanarodriguez1828 3 года назад

    Hi I dont know if someone can help me, I did exactly the same, I even download the source and duplicate every single measure but when I put total sales it puts the same amount but when I have filter CY 2010 and put the forecast measure it just show blank, when I remove the filter it shows values, why could that happen?¡

    • @SQLBI
      @SQLBI  3 года назад

      Compare your file with the file you can download in the related article (see video description).

  • @droctowiz5968
    @droctowiz5968 2 года назад

    I understood the remove and keep filters, but why did the expression override the contextual filters in the first place ? Is it because of the removefilters in the expression of the variable ?

  • @amarnadhgunakala2901
    @amarnadhgunakala2901 3 года назад +1

    New content

  • @SHAUNVINDA
    @SHAUNVINDA 8 месяцев назад

    super mario