How to forecast data using DAX in Power BI? | Forecast Data in Power BI | DAX | BI Consulting Pro

Поділитися
Вставка
  • Опубліковано 10 жов 2024

КОМЕНТАРІ • 78

  • @BIConsultingPro
    @BIConsultingPro  3 роки тому +3

    You can download .pbix file from here: 1drv.ms/u/s!ApIf9f9Q3qOxlEaFBf_KoEYzKWES?e=w87h7Q

  • @mthokozisithandolwethumthe8461
    @mthokozisithandolwethumthe8461 3 роки тому +1

    WoW - I'm still new to PowerBi and I had no idea that this was possible. Much appreciated man

  • @bpremchand93
    @bpremchand93 3 роки тому +1

    Thank you so much for the DA-100 tutorial videos, that helped me to complete my certification today. Many Thanks :)

  • @rutujanagare741
    @rutujanagare741 Рік тому +1

    Pls keep posting such type of vdos , very useful..Thanks alot !

  • @komanguy
    @komanguy 3 роки тому +1

    Thanks for this video! Thanks for the LASTNONBLANK and FIRSTNONBLANK functions too!

  • @gilbertosantos2503
    @gilbertosantos2503 3 роки тому +4

    That's great solution - thanks for sharing it. How to do this forecasting when we have a sales data by monthly timing and it needs to calculate the forecast based on MAT? Many thanks for your tips. All best.

    • @saisalian5500
      @saisalian5500 3 роки тому +2

      I am also looking for similar solution. Need a measure to create forecast with growth percentage prediction from industry data and some correction from previous months data. If you can help would be great. Cheers

    • @gambu4810
      @gambu4810 2 роки тому

      Me too please 🙏🙏🙏

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      To modify the given DAX code for forecasting based on Monthly Aggregated Total (MAT), you can make the following adjustments:
      Forecast =
      VAR Lastyear = [Last Year]
      VAR No_of_years = SELECTEDVALUE('Year Table'[Year]) - Lastyear
      RETURN
      IF (
      SELECTEDVALUE('Year Table'[Year]) > Lastyear,
      CALCULATE(
      SUM('Sales Table'[Sales]),
      'Year Table'[Year] = Lastyear
      ) * POWER((1 + [CAGR]), No_of_years),
      BLANK()
      )
      I hope this will help you. Don't forget to share your feedback!!

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      @@saisalian5500
      To modify the given DAX code for forecasting based on Monthly Aggregated Total (MAT), you can make the following adjustments:
      Forecast =
      VAR Lastyear = [Last Year]
      VAR No_of_years = SELECTEDVALUE('Year Table'[Year]) - Lastyear
      RETURN
      IF (
      SELECTEDVALUE('Year Table'[Year]) > Lastyear,
      CALCULATE(
      SUM('Sales Table'[Sales]),
      'Year Table'[Year] = Lastyear
      ) * POWER((1 + [CAGR]), No_of_years),
      BLANK()
      )
      I hope this will help you. Don't forget to share your feedback!!

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      @@gambu4810
      To modify the given DAX code for forecasting based on Monthly Aggregated Total (MAT), you can make the following adjustments:
      Forecast =
      VAR Lastyear = [Last Year]
      VAR No_of_years = SELECTEDVALUE('Year Table'[Year]) - Lastyear
      RETURN
      IF (
      SELECTEDVALUE('Year Table'[Year]) > Lastyear,
      CALCULATE(
      SUM('Sales Table'[Sales]),
      'Year Table'[Year] = Lastyear
      ) * POWER((1 + [CAGR]), No_of_years),
      BLANK()
      )
      I hope this will help you. Don't forget to share your feedback!!

  • @arnoldtagne4641
    @arnoldtagne4641 Рік тому

    Thanks for sharing.
    I tried it but I get zero all over the years for CAGR

  • @sushmak7867
    @sushmak7867 10 місяців тому

    Hi, video is really awesome...in the line chart is it possible to group 2014 ,2016 values and show as a single value and followed by forecast

  • @sulaimonkehinde8639
    @sulaimonkehinde8639 2 місяці тому +1

    Nice job and very interesting

  • @skinnyulam6801
    @skinnyulam6801 Рік тому +1

    Just amazing!

  • @Arkngthunchsturdumz
    @Arkngthunchsturdumz 3 роки тому +2

    Very useful, thank you

  • @02reeta
    @02reeta 3 роки тому +1

    Your Videos are really amazing, I am really new to power bi learning from Udemy, but from you, I am extracting new thing which is not mentioned in my course, Thanks I am following your videos, my background in digital marketing, now want to switch Power bi, how can I get a job any help?? Thanks in Advance. Reeta

    • @BIConsultingPro
      @BIConsultingPro  3 роки тому

      You need to create a resume that can demonstrate your skills in Power BI, SQL area!

  • @jafarhussain4665
    @jafarhussain4665 3 місяці тому

    Hi, Thanks for Uploading this Video.
    Can you please make a video for Monthly Forecast as well??
    Thank you

  • @Travelwithus304
    @Travelwithus304 3 роки тому +2

    Sir I have a question,I learnt power bi by self,and I followed your videoes,I have total experience of 2 years 8 months,I gave multiple interviews and I am selected in one of the best company as a PowerBi Developer, Thanks a lot sir but will it make any problem for me as I don't have any real life project experience,I learnt it by self,practiced by self,made 2 to 3 dashboards and I am learning till now.

    • @BIConsultingPro
      @BIConsultingPro  3 роки тому +2

      If you have learned it well then there won't be any problem. Also, remember, the best experience comes from on job training so don't worry, everything is going to be all right! By the way, congratulations!!

    • @Travelwithus304
      @Travelwithus304 3 роки тому +1

      Thank you Sir for your motivation and if I will stuck, your videoes are there☺️I will learn more while working also☺️

  • @angelmaravilla4708
    @angelmaravilla4708 Рік тому

    Man!! This is freacking amaazing!!, only one doubt:
    How can you change the code, if we want that the CAGR change dynamicaly with a slicer??
    I mean, the last code calculates the CAGR taking in consideration ALL the years with sales (lets say "2015 to "2022"), but when with a slicer I select another range (let's say "2018 to 2022"), the ratio doesn't change...
    Do you know what changes must be done on the DAX code?

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      Try the following DAX Code:
      Forecast =
      VAR Lastyear = [Last Year]
      VAR No_of_years = SELECTEDVALUE('Year Table'[Year]) - Lastyear
      VAR DynamicCAGR = SELECTEDVALUE('CAGR Slicer'[CAGR])
      RETURN
      IF (
      SELECTEDVALUE('Year Table'[Year]) > Lastyear,
      CALCULATE(
      SUM('Sales Table'[Sales]),
      'Year Table'[Year] = Lastyear
      ) * POWER((1 + DynamicCAGR), No_of_years),
      BLANK()
      )

  • @abhinayrozer7379
    @abhinayrozer7379 3 роки тому +1

    Much informative.. thankyou man

  • @SuperNeha1983
    @SuperNeha1983 Рік тому

    how to apply formulas for forecasting values. For example, i have annual premium but want to apply premium rate % to policies after current date and calculate future premium.

  • @fahadyousuf6398
    @fahadyousuf6398 Рік тому

    Thank You, such a helpful video, but can this method be used if I want to do month-wise forecasting, please reply ???

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      You can do it via three steps:
      1) Create a date table with a column containing all the months you want to forecast.
      2) Add the historical data to your Power BI report, including a column with the corresponding month for each data point.
      3) Create a measure to calculate the total sales for each month in the historical data. For example, if your sales data is in a table called 'Sales', and your date column is called 'Date', the measure might look like this:
      Total Sales = SUM(Sales[Sales Amount])
      4) Create a measure to calculate the monthly growth rate for each month. This can be done using the following formula:
      Monthly Growth Rate = DIVIDE(
      [Total Sales],
      CALCULATE(
      [Total Sales],
      DATEADD('Date'[Date], -1, MONTH)
      )
      ) - 1
      5) Finally, create a measure to forecast the sales for each month in the future. This can be done using the following formula:
      Forecast Sales = [Total Sales] * (1 + [Monthly Growth Rate])
      This formula uses the [Total Sales] and [Monthly Growth Rate] measures to calculate the forecasted sales for each month.
      To visualize the forecast, you can create a line chart with the date column on the x-axis, and the [Total Sales] and [Forecast Sales] measures on the y-axis. This will show the historical sales data as well as the forecasted sales for each month.

  • @juanignacioXI
    @juanignacioXI 3 роки тому +1

    Great video, very useful. Can it be done with months?

  • @smohammadeliyaz134
    @smohammadeliyaz134 3 роки тому

    Awesome! This is really helpful. Keep posting. Thank you.

    • @smohammadeliyaz134
      @smohammadeliyaz134 3 роки тому

      I have a question, I would like to add multiple conditions in the forecast values.
      When I tried to add conditions in the CALCULATE(SUM(measure),
      Year table[year]= Lastyear,
      'Sales table'[Location]= "London",
      'Sales table'[Product]="Furniture"
      I am not getting the correct results.
      Your help is much appreciated.
      Thank you

  • @bukunmiadebanjo9684
    @bukunmiadebanjo9684 Рік тому

    Great content @Bi. Please is this applicable to categorical dataset. For example forecasting sales for Furniture, Clothing and Household items.

    • @BIConsultingPro
      @BIConsultingPro  Рік тому +1

      Hi, thank you for your feedback. You can try it and share your feedback. In order to see forecast, you should have a timeline so I don't think this will work for categories. However, if you want any option, please do share with us too.

  • @jayantmishra4270
    @jayantmishra4270 Рік тому

    In some paper they have asked
    Which is not a forecasting technique
    Regression
    Time series
    HOLT & WINTER method
    Exponential smoothing
    Which option I need to select ??

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      Regression is not a forecasting technique in the context of time series forecasting.
      While regression analysis is a valuable statistical method for understanding relationships between variables, it is not a standalone technique for time series forecasting. Time series techniques like Holt-Winters method and exponential smoothing are more suitable for forecasting when dealing with time series data.

  • @fw4693
    @fw4693 11 місяців тому

    Please which method statistique do u use ? Ans how do u calculate saisonality ?

    • @BIConsultingPro
      @BIConsultingPro  10 місяців тому

      You may would like to read here: www.thebiccountant.com/2022/05/29/forecasting-with-seasonality-in-power-bi/
      Let me know if that helps otherwise I’ll explain you in detail later.

  • @bhagirathiramesh1891
    @bhagirathiramesh1891 5 місяців тому

    is there a way that stakeholders can enter Forecast length instead of us configuring it?

    • @BIConsultingPro
      @BIConsultingPro  4 місяці тому

      In Power BI, you can't use it but using Power Apps in Power BI, you can try. This will allow you to enter it as a parameter.

  • @yashjk899
    @yashjk899 2 роки тому

    Hii
    This forecast is useful when our raw data is gradually increase.
    But if any fluctuation then?

    • @BIConsultingPro
      @BIConsultingPro  2 роки тому

      probably, we need to change logic then. However, this should work. It all depends on your logic of forecasting. You can try to change it as per your situation.

  • @pthapa55
    @pthapa55 11 місяців тому

    When I followed your example, mine forecast is coming nothing at all. What could be the issue?

    • @BIConsultingPro
      @BIConsultingPro  10 місяців тому +1

      Honestly, I am not sure. Can you share your .pbix file with me at connect@biconsultingpro.com?

    • @pthapa55
      @pthapa55 10 місяців тому

      I have sent the sample dataset in the inbox.@@BIConsultingPro

  • @Emerikled
    @Emerikled 2 роки тому +1

    How to do the same idea but with quarters?

    • @BIConsultingPro
      @BIConsultingPro  2 роки тому

      I haven't figure it out yet. However, I promise, I'll look into this.

  • @AwesomeEndings
    @AwesomeEndings 3 місяці тому

    Is it same way for Monthly forcast

    • @BIConsultingPro
      @BIConsultingPro  3 місяці тому

      Yes but using DAX logic rather than using Power BI Desktop app

  • @DonVictron
    @DonVictron 3 роки тому

    Can I use this method without grouping, so I can retail all other slicer fields?

    • @BIConsultingPro
      @BIConsultingPro  3 роки тому

      Give it a try, and let me know your findings! We shouldn't hesitate trying. We always learn something.

  • @anjandas9269
    @anjandas9269 2 роки тому

    I have Date Dim Table, i.e. Calendar Auto. I am choosing "Date Dim[Year]". It it correct ?

    • @BIConsultingPro
      @BIConsultingPro  2 роки тому

      Yes, you can use it but make sure you have the correct data model.

  • @syedabthahir4511
    @syedabthahir4511 3 роки тому

    Hi sir looking for this solution past 3 month. But in my case instead of last years can we forecast based on last 3 average days value until reaching the goals.
    Example
    Total 1000 pcs
    Done 450 pcs and my last 3 days average 45 pcs. I need the dotted curve continuation of actual curve until to reach 1000 by required working days... is it possible thanks in advance

  • @pingi014
    @pingi014 Рік тому

    Unfortunately, my forecast DAX formula came out as blank :(

  • @rutujanagare741
    @rutujanagare741 Рік тому

    You have made Forecasting on the basis of Year and I want to make on the basis of Month , so i have created formula accordingly that , but still its not working , pls suggest

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      Hi, Thanks for your reply. Although, I haven't tried your case but I'll have a look once I get sometime, and will get back to you.

  • @rogeriopsvalle
    @rogeriopsvalle 2 роки тому

    Mr.
    I hope this message finds you well.
    Do you have by any chance, tips or Works related to criation of S Curve with primavera P6 conected to SQL DB
    If you could share I would aprecciated.
    Thanks in advance
    Regards.

    • @BIConsultingPro
      @BIConsultingPro  2 роки тому

      I don't! I can have a look into this but currently, I cannot promise as I am swamped with my work.

    • @rogeriopsvalle
      @rogeriopsvalle 2 роки тому

      @@BIConsultingPro I appreciate your attention. I will look forward to your answer.
      Regards.

  • @abbabccbcddc
    @abbabccbcddc Рік тому

    can this be done with bar chart?

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      Bar chart is for categories and forecast needs a timeline.

  • @anjandas9269
    @anjandas9269 2 роки тому

    When I going to calculate the forecast, it is showing an error . CAGS power function is not correct.

  • @siridinath
    @siridinath Рік тому

    I have tried it but is it is showing error
    a function placeholder has been used in a true or false which is not allowed

    • @BIConsultingPro
      @BIConsultingPro  Рік тому

      Did you try the code as it is?

    • @siridinath
      @siridinath Рік тому

      @@BIConsultingPro ya

    • @MGleb-tp1kr
      @MGleb-tp1kr Рік тому

      You've put last year and first into brackets (CALCULATE(SUM('Data'[Quantity]),'Data'[Year] = LastYear(here!), remove them and formula will be working

  • @israelrangel6063
    @israelrangel6063 Рік тому

    hehe, and what's DAX?