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
Hi
I've got a table like this
year Sales
2012 10
2013 12
2014 13
2015 13
2016 16
2017 15
2018 17
In can put this in to a Line Chart Visual and a Trend Line. This will show me the Sales Trend. I want to find the slop of the trend line by using a linear regression in DAX. How do I do that?
It's very simple in Excel
Hello @Torbenan
Take a look at this excellent post by Daniil Maslyuk. https://xxlbi.com/blog/simple-linear-regression-in-dax/
Thank - that seems to be the way to go. Just wonder, why this i so simple in Excel (=LINREGR(B3:B9;A3:A9)) and so complicated in Power Bi
Because Excel is 25 years older than DAX.
They add new features every month so you may see something like LINREGX(table,expression) in the future.
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.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |