Forum Discussion
Help me to get the Linear measures ?
Hi ,
How can I achieve the output of
Linear (Drivers Licence Validation)
Linear (infringements)
Currently my report Lince and Clustured Column Chart looks like below
2 Replies
- Jihwan_Kim
Super User
Hi,
Please check the link down below, that describes about LINESTX DAX function, whether it is what you are looking for.
LINESTX function (DAX) - DAX | Microsoft Learn
Uses the Least Squares method to calculate a straight line that best fits the given data, then returns a table describing the line. The data result from expressions evaluated for each row in a table. The equation for the line is of the form: y = Slope1*x1 + Slope2*x2 + ... + Intercept.
- Ritaf1983
Super User
Hi ashmitp869
In Power BI, there’s a built-in Trend line feature that you can enable from the Analytics pane in your chart.
However, this option only works when your X-axis is set to Continuous (for example, a continuous date field).If your axis is Categorical or you’re using a Combo chart, the feature won’t be available.
In that case, you can manually create a linear line using DAX, by calculating the linear regression and then returning the line value for each point on the X-axis.More guideness by the link
https://www.youtube.com/watch?v=IL9TsmHVyZE
The pbix with the example of the simple version is attachedIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly