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 all,
I originally created my power bi model by simply importing data from an excel model, but now my task is to do all the calculations in power bi itself to make the excel model redundent.
With power bi not having all the functions that excel has, I'm having trouble calculating an estimated values table for 2 variables using linear regression dax code. I've tried using the following measure: https://community.powerbi.com/t5/Desktop/Liner-Regression-in-DAX-query-and-EXCEL-Linest/m-p/579390#M...
However, I'm not quite sure how to apply it to my situation.
Here is the table im trying to produce: It actually has 38 columns (not including date) of the same calculations. The data used for the calulcations was pulled from a table of normalized values (15min. resolution) and the values were calculated using the formula: LINEST(Normalized!B$2:B$2977,IF(Normalized!B$2:B$2977>0,Normalized!$AN$2:$AN$2977,0),FALSE,TRUE)*1100
-the value range of the formula is dictated by month
| Date | Inverter 01.1 |
| 1/01/2020 | 0.905523712 |
| 1/02/2020 | 0.935388997 |
| 1/03/2020 | 0.985759406 |
| 1/04/2020 | 0.977461843 |
| 1/05/2020 | 0.974799106 |
| 1/06/2020 | 0.979397699 |
| 1/07/2020 | 0.984387728 |
| 1/08/2020 | 0.955793923 |
I already have the normalized values table in power bi, now I just need to produce a table of values using linear regression in the format of the table above. I understand this is a big ask but any and all help would be appretiated.
Many thanks.
Hope this video helps with the concept:
Hi @Anonymous ,
For linear regression, please refer to the following blog.
https://xxlbi.com/blog/simple-linear-regression-in-dax/
https://community.powerbi.com/t5/Quick-Measures-Gallery/Simple-Linear-Regression/td-p/247439
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data and describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |