Forum Discussion
Slope from LINEST as new column
Thank you for the answer. Here is sample RAW data.
| Time | A | B |
| 0 | 0.160039 | 0.151217 |
| 0.1 | 0.140077 | 0.151217 |
| 0.2 | 0.160039 | 0.151217 |
| 0.3 | 0.140077 | 0.135 |
| 0.4 | 0.140077 | 0.135 |
| 0.5 | 0.140077 | 0.135 |
| 0.6 | 0.160039 | 0.151217 |
| 0.7 | 0.140077 | 0.151217 |
| 0.8 | 0.160039 | 0.135 |
| 0.9 | 0.160039 | 0.135 |
| 1 | 0.140077 | 0.135 |
| 1.1 | 0.160039 | 0.135 |
| 1.2 | 0.160039 | 0.151217 |
| 1.3 | 0.140077 | 0.135 |
| 1.4 | 0.160039 | 0.216083 |
| 1.5 | 0.120116 | 0.151217 |
| 1.6 | 0.140077 | 0.167433 |
| 1.7 | 0.120116 | 0.151217 |
| 1.8 | 0.140077 | 0.135 |
| 1.9 | 0.160039 | 0.135 |
| 2 | 0.140077 | 0.135 |
| 2.1 | 0.160039 | 0.151217 |
| 2.2 | 0.160039 | 0.135 |
| 2.3 | 0.120116 | 0.151217 |
| 2.4 | 0.120116 | 0.151217 |
| 2.5 | 0.160039 | 0.151217 |
| 2.6 | 0.140077 | 0.135 |
| 2.7 | 0.140077 | 0.118783 |
| 2.8 | 0.160039 | 0.135 |
| 2.9 | 0.160039 | 0.151217 |
| 3 | 0.140077 | 0.135 |
| 3.1 | 0.120116 | 0.151217 |
| 3.2 | 0.160039 | 0.151217 |
| 3.3 | 0.160039 | 0.102567 |
| 3.4 | 0.160039 | 0.102567 |
| 3.5 | 0.140077 | 0.151217 |
| 3.6 | 0.140077 | 0.135 |
| 3.7 | 0.120116 | 0.151217 |
| 3.8 | 0.120116 | 0.151217 |
| 3.9 | 0.140077 | 0.135 |
| 4 | 0.160039 | 0.135 |
| 4.1 | 0.160039 | 0.118783 |
| 4.2 | 0.120116 | 0.135 |
| 4.3 | 0.140077 | 0.135 |
| 4.4 | 0.160039 | 0.135 |
| 4.5 | 0.120116 | 0.151217 |
| 4.6 | 0.120116 | 0.151217 |
| 4.7 | 0.140077 | 0.135 |
| 4.8 | 0.160039 | 0.135 |
| 4.9 | 0.140077 | 0.151217 |
| 5 | 0.140077 | 0.135 |
I have a lot more columns, each with a different name and more will be added in the future.
I use get data from folder to combine files and unpivoting to get the table as in the image in the original post. I want to automatize data analysis process in PowerBI and I am stuck with calculating the rate column. Previously I have done it in excel with the formula {=LINEST(LN(B2:B6);A2:A6;1;1)} to calculate rate as slope for 0.5 hour. B is column with A values and A is column with time values.
My end goal is to visualise in PowerBI the original data together with the rate for each type (A, B etc) as in the image for type A:
- lbendlin3 years agoSuper User
Thank you for the sample data.
1) you can use TOPN(5,...) for your example, or one of the new windowing functions.
2) to render the result are you only looking to plot the intercepts?
- nufffins3 years agoFrequent Visitor
Thanks for answer!
1) Could you please explain a bit more how to use this function? Where should I write it?
2) I'm not sure I understand the question. I'm using slope for ploting (to desribe exponential growth) not intercepts.- lbendlin3 years agoSuper User
This is what I have so far and it doesn't look good
That would mean you would have to prepopulate a table with the windowed timestamps.
Looking into LINESTX, and into CALCULATETABLE.