Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello all. I'm hoping someone in the community could help me out. I am trying to create a basic linear regression prediction. I've followed the following tutorials, but neither of them worked properly.
* Use Custom DAX to create a Linear Regression Trendline with a Dynamic Date Hierarchy in Power BI
* Simply Linear Regression YouTube
When I follow the first tutorial, I end up just getting a straight line for my regression. When I followed the second tutorial and use the date table in order to see dates into the future, the regression line ends up tracking perfectly to the actual amount sold. Neither method, when it works, actually shows me what the data should be on a future date.
Please find below some sample data that mimics the data I'm working with. In addition to this data, I use a DAX-created Date Table to filter dates. I need to be able to use linear regression to predict the future values of each product on the quarter level.
Edit: Please be aware that the data I am using is by day with many blanks, but to be able to post here I had to pair it down to the month level.
Edit 2: The dates into the future aren't in the same table as the sold info.
| Date | Product | Sold |
| 1/1/2020 | Product One | 14 |
| 2/1/2020 | Product One | 24 |
| 3/1/2020 | Product One | 10 |
| 4/1/2020 | Product One | 12 |
| 5/1/2020 | Product One | 15 |
| 6/1/2020 | Product One | 22 |
| 7/1/2020 | Product One | 3 |
| 8/1/2020 | Product One | 26 |
| 9/1/2020 | Product One | 22 |
| 10/1/2020 | Product One | 2 |
| 11/1/2020 | Product One | 17 |
| 12/1/2020 | Product One | 14 |
| 1/1/2021 | Product One | 28 |
| 2/1/2021 | Product One | 4 |
| 3/1/2021 | Product One | 1 |
| 4/1/2021 | Product One | 1 |
| 5/1/2021 | Product One | 13 |
| 6/1/2021 | Product One | 7 |
| 7/1/2021 | Product One | 5 |
| 8/1/2021 | Product One | 28 |
| 9/1/2021 | Product One | 15 |
| 10/1/2021 | Product One | 22 |
| 11/1/2021 | Product One | 5 |
| 12/1/2021 | Product One | 1 |
| 1/1/2022 | Product One | 10 |
| 2/1/2022 | Product One | 28 |
| 3/1/2022 | Product One | 12 |
| 4/1/2022 | Product One | 64 |
| 5/1/2022 | Product One | 29 |
| 6/1/2022 | Product One | 16 |
| 7/1/2022 | Product One | 17 |
| 8/1/2022 | Product One | 16 |
| 9/1/2022 | Product One | 16 |
| 10/1/2022 | Product One | 5 |
| 11/1/2022 | Product One | 27 |
| 12/1/2022 | Product One | |
| 1/1/2023 | Product One | |
| 2/1/2023 | Product One | |
| 3/1/2023 | Product One | |
| 4/1/2023 | Product One | |
| 5/1/2023 | Product One | |
| 6/1/2023 | Product One | |
| 7/1/2023 | Product One | |
| 8/1/2023 | Product One | |
| 9/1/2023 | Product One | |
| 10/1/2023 | Product One | |
| 11/1/2023 | Product One | |
| 12/1/2023 | Product One | |
| 1/1/2024 | Product One | |
| 2/1/2024 | Product One | |
| 3/1/2024 | Product One | |
| 4/1/2024 | Product One | |
| 5/1/2024 | Product One | |
| 6/1/2024 | Product One | |
| 7/1/2024 | Product One | |
| 8/1/2024 | Product One | |
| 9/1/2024 | Product One | |
| 10/1/2024 | Product One | |
| 11/1/2024 | Product One | |
| 12/1/2024 | Product One | |
| 1/1/2021 | Product Two | 18 |
| 2/1/2021 | Product Two | 32 |
| 3/1/2021 | Product Two | 53 |
| 4/1/2021 | Product Two | 47 |
| 5/1/2021 | Product Two | 59 |
| 6/1/2021 | Product Two | 38 |
| 7/1/2021 | Product Two | 46 |
| 8/1/2021 | Product Two | 39 |
| 9/1/2021 | Product Two | 68 |
| 10/1/2021 | Product Two | 54 |
| 11/1/2021 | Product Two | 33 |
| 12/1/2021 | Product Two | 27 |
| 1/1/2022 | Product Two | 61 |
| 2/1/2022 | Product Two | 31 |
| 3/1/2022 | Product Two | 25 |
| 4/1/2022 | Product Two | 12 |
| 5/1/2022 | Product Two | 36 |
| 6/1/2022 | Product Two | 61 |
| 7/1/2022 | Product Two | 67 |
| 8/1/2022 | Product Two | 37 |
| 9/1/2022 | Product Two | 25 |
| 10/1/2022 | Product Two | 69 |
| 11/1/2022 | Product Two | 5 |
| 12/1/2022 | Product Two | 10 |
| 1/1/2023 | Product Two | 18 |
| 2/1/2023 | Product Two | 28 |
| 3/1/2023 | Product Two | 51 |
| 4/1/2023 | Product Two | 58 |
| 5/1/2023 | Product Two | 60 |
| 6/1/2023 | Product Two | 19 |
| 7/1/2023 | Product Two | 34 |
| 8/1/2023 | Product Two | 17 |
| 9/1/2023 | Product Two | 70 |
| 10/1/2023 | Product Two | 49 |
| 11/1/2023 | Product Two | 45 |
| 12/1/2023 | Product Two | 52 |
| 1/1/2024 | Product Two | 54 |
| 2/1/2024 | Product Two | 47 |
| 3/1/2024 | Product Two | 20 |
| 4/1/2024 | Product Two | 49 |
| 5/1/2024 | Product Two | 20 |
| 6/1/2024 | Product Two | 62 |
| 7/1/2024 | Product Two | 52 |
| 8/1/2024 | Product Two | 67 |
| 9/1/2024 | Product Two | 15 |
| 10/1/2024 | Product Two | 49 |
| 11/1/2024 | Product Two | 28 |
| 12/1/2024 | Product Two | 60 |
| 1/1/2020 | Product Two | 14 |
| 2/1/2020 | Product Two | 49 |
| 3/1/2020 | Product Two | 41 |
| 4/1/2020 | Product Two | 17 |
| 5/1/2020 | Product Two | 25 |
| 6/1/2020 | Product Two | 48 |
| 7/1/2020 | Product Two | 18 |
| 8/1/2020 | Product Two | 15 |
| 9/1/2020 | Product Two | 34 |
| 10/1/2020 | Product Two | 44 |
| 11/1/2020 | Product Two | 15 |
| 12/1/2020 | Product Two | 53 |
| 1/1/2021 | Product Two | 10 |
| 2/1/2021 | Product Two | 70 |
| 3/1/2021 | Product Two | 47 |
| 4/1/2021 | Product Two | 44 |
| 5/1/2021 | Product Two | 48 |
| 6/1/2021 | Product Two | 62 |
| 7/1/2021 | Product Two | 50 |
| 8/1/2021 | Product Two | 59 |
| 9/1/2021 | Product Two | 70 |
| 10/1/2021 | Product Two | 59 |
| 11/1/2021 | Product Two | 32 |
| 12/1/2021 | Product Two | 29 |
| 1/1/2022 | Product Two | 64 |
| 2/1/2022 | Product Two | 52 |
| 3/1/2022 | Product Two | 65 |
| 4/1/2022 | Product Two | 40 |
| 5/1/2022 | Product Two | 13 |
| 6/1/2022 | Product Two | 37 |
| 7/1/2022 | Product Two | 59 |
| 8/1/2022 | Product Two | 27 |
| 9/1/2022 | Product Two | 26 |
| 10/1/2022 | Product Two | 32 |
| 11/1/2022 | Product Two | 19 |
| 12/1/2022 | Product Two | |
| 1/1/2023 | Product Two | |
| 2/1/2023 | Product Two | |
| 3/1/2023 | Product Two | |
| 4/1/2023 | Product Two | |
| 5/1/2023 | Product Two | |
| 6/1/2023 | Product Two | |
| 7/1/2023 | Product Two | |
| 8/1/2023 | Product Two | |
| 9/1/2023 | Product Two | |
| 10/1/2023 | Product Two | |
| 11/1/2023 | Product Two | |
| 12/1/2023 | Product Two | |
| 1/1/2024 | Product Two | |
| 2/1/2024 | Product Two | |
| 3/1/2024 | Product Two | |
| 4/1/2024 | Product Two | |
| 5/1/2024 | Product Two | |
| 6/1/2024 | Product Two | |
| 7/1/2024 | Product Two | |
| 8/1/2024 | Product Two | |
| 9/1/2024 | Product Two | |
| 10/1/2024 | Product Two | |
| 11/1/2024 | Product Two | |
| 12/1/2024 | Product Two | |
| 1/1/2020 | Product Two | |
| 2/1/2020 | Product Two | |
| 3/1/2020 | Product Two | |
| 4/1/2020 | Product Two | |
| 5/1/2020 | Product Two | |
| 6/1/2020 | Product Two | |
| 7/1/2020 | Product Two | |
| 8/1/2020 | Product Two | |
| 9/1/2020 | Product Two | |
| 10/1/2020 | Product Two | |
| 11/1/2020 | Product Two | |
| 12/1/2020 | Product Two | |
| 1/1/2021 | Product Two | |
| 2/1/2021 | Product Two | |
| 3/1/2021 | Product Two | |
| 4/1/2021 | Product Two | |
| 5/1/2021 | Product Two | |
| 6/1/2021 | Product Two | |
| 7/1/2021 | Product Two | |
| 8/1/2021 | Product Two | |
| 9/1/2021 | Product Two | |
| 10/1/2021 | Product Two | |
| 11/1/2021 | Product Two | |
| 12/1/2021 | Product Two | |
| 1/1/2022 | Product Two | |
| 2/1/2022 | Product Two | |
| 3/1/2022 | Product Two | |
| 4/1/2022 | Product Two | |
| 5/1/2022 | Product Two | |
| 6/1/2022 | Product Two | |
| 7/1/2022 | Product Two | |
| 8/1/2022 | Product Two | |
| 9/1/2022 | Product Two | |
| 10/1/2022 | Product Two | |
| 11/1/2022 | Product Two | |
| 12/1/2022 | Product Two | |
| 1/1/2023 | Product Two | |
| 2/1/2023 | Product Two | |
| 3/1/2023 | Product Two | |
| 4/1/2023 | Product Two | |
| 5/1/2023 | Product Two | |
| 6/1/2023 | Product Two | |
| 7/1/2023 | Product Two | |
| 8/1/2023 | Product Two | |
| 9/1/2023 | Product Two | |
| 10/1/2023 | Product Two | |
| 11/1/2023 | Product Two | |
| 12/1/2023 | Product Two | |
| 1/1/2024 | Product Two | |
| 2/1/2024 | Product Two | |
| 3/1/2024 | Product Two | |
| 4/1/2024 | Product Two | |
| 5/1/2024 | Product Two | |
| 6/1/2024 | Product Two | |
| 7/1/2024 | Product Two | |
| 8/1/2024 | Product Two | |
| 9/1/2024 | Product Two | |
| 10/1/2024 | Product Two | |
| 11/1/2024 | Product Two | |
| 12/1/2024 | Product Two | |
| 1/1/2020 | Product Three | 7 |
| 2/1/2020 | Product Three | 24 |
| 3/1/2020 | Product Three | 18 |
| 4/1/2020 | Product Three | 14 |
| 5/1/2020 | Product Three | 60 |
| 6/1/2020 | Product Three | 7 |
| 7/1/2020 | Product Three | 26 |
| 8/1/2020 | Product Three | 14 |
| 9/1/2020 | Product Three | 14 |
| 10/1/2020 | Product Three | 8 |
| 11/1/2020 | Product Three | 16 |
| 12/1/2020 | Product Three | 14 |
| 1/1/2021 | Product Three | 11 |
| 2/1/2021 | Product Three | 19 |
| 3/1/2021 | Product Three | 25 |
| 4/1/2021 | Product Three | 20 |
| 5/1/2021 | Product Three | 100 |
| 6/1/2021 | Product Three | 14 |
| 7/1/2021 | Product Three | 20 |
| 8/1/2021 | Product Three | 12 |
| 9/1/2021 | Product Three | 22 |
| 10/1/2021 | Product Three | 10 |
| 11/1/2021 | Product Three | 11 |
| 12/1/2021 | Product Three | 13 |
| 1/1/2022 | Product Three | 16 |
| 2/1/2022 | Product Three | 14 |
| 3/1/2022 | Product Three | 15 |
| 4/1/2022 | Product Three | 10 |
| 5/1/2022 | Product Three | 8 |
| 6/1/2022 | Product Three | 17 |
| 7/1/2022 | Product Three | 14 |
| 8/1/2022 | Product Three | 20 |
| 9/1/2022 | Product Three | 18 |
| 10/1/2022 | Product Three | 24 |
| 11/1/2022 | Product Three | 13 |
| 12/1/2022 | Product Three | |
| 1/1/2023 | Product Three | |
| 2/1/2023 | Product Three | |
| 3/1/2023 | Product Three | |
| 4/1/2023 | Product Three | |
| 5/1/2023 | Product Three | |
| 6/1/2023 | Product Three | |
| 7/1/2023 | Product Three | |
| 8/1/2023 | Product Three | |
| 9/1/2023 | Product Three | |
| 10/1/2023 | Product Three | |
| 11/1/2023 | Product Three | |
| 12/1/2023 | Product Three | |
| 1/1/2024 | Product Three | |
| 2/1/2024 | Product Three | |
| 3/1/2024 | Product Three | |
| 4/1/2024 | Product Three | |
| 5/1/2024 | Product Three | |
| 6/1/2024 | Product Three | |
| 7/1/2024 | Product Three | |
| 8/1/2024 | Product Three | |
| 9/1/2024 | Product Three | |
| 10/1/2024 | Product Three | |
| 11/1/2024 | Product Three | |
| 12/1/2024 | Product Three |
From my data, I am able to produce the image below (scrubbed of anything identifiable). The x-axis is the month and the y-axis is the value. The issue I'm having is that my line does not continue into the future. I believe it might be because the dates it is built from don't go into the future. Furthermore, I can't change the data from month to quarter and still get a result. I'm assuming the dark blue line is correct, but since I can't get it to work the way I intend, I don't know.
Linear regression is designed to fit data with a line, so I'm not sure what you think you should be getting. Can you show more clearly what you're getting and what you're expecting to get?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!