Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I am learning how to use the linest function. The graph in the photo below is a linest graph I created, but the values seem to be coming out strangely. Can you make one using the linest function or linestx function using the example file below?
https://drive.google.com/file/d/17Ar2TXllzxBGsWMKDi0XRkl_2tDgBIxP/view
Solved! Go to Solution.
Want to predict sales for the below five estimated year:
Try code as below:
PredictedValues =
VAR Intercept = MAX(PredictedValue[Intercept])
VAR Slope = MAX(PredictedValue[Slope1])
VAR Year = SELECTEDVALUE('Estimated Year'[Est Year])
RETURN
Slope * Year + Intercept
Now you can develop visual you want, say line chart:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Hi @Fighting21 , Linest or Linestx function is a Least Squares method which basically use to predict what could be the future data. For example, if I have sales data of past year, what could be the sales value of the upcomming year based on the past data.
These function returns table of estimates, which you can use to predict future. For example:
lines =
LINEST(
'DataTable'[Value],
'DataTable'[Date]
)This will return a table with many estimator as follows:
You can use Slope and Intercept to establish equation as : Slope * [Value] + Intercept.
Hope this helps!!
If this solved your problem, please accept it as a solution and kudos!!
Best Regards,
Shahariar Hafiz
Thank you for your reply thank you very much, but could you know how to wirte [?Value?] in this example file? this is key of my question.
Want to predict sales for the below five estimated year:
Try code as below:
PredictedValues =
VAR Intercept = MAX(PredictedValue[Intercept])
VAR Slope = MAX(PredictedValue[Slope1])
VAR Year = SELECTEDVALUE('Estimated Year'[Est Year])
RETURN
Slope * Year + Intercept
Now you can develop visual you want, say line chart:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |