Forum Discussion
Need Help on Autocorrelation Calculation
- 2 years ago
Here you go
Most likelky not. Power BI has no memory and no concept of self-referencing without becoming all upset about circular references.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Hello lbendlin
here is the sample data. Basically that is a data came from the website that i mentioned (I am trying to recreate the result before applying it into real data).
| Jan | 56 |
| Feb | 58 |
| Mar | 69 |
| Apr | 50 |
| May | 66 |
| Jun | 68 |
| Jul | 78 |
| Aug | 73 |
| Sept | 88 |
| Oct | 90 |
Here is the result that I wish to get in Power BI
However, if Power BI has no memory or concept of self-referencing, then it is impossible doing autocorrelation in Power BI?
Thank you and really appreciate for the help.
- lbendlin2 years agoSuper User
Here you go
- Irwan2 years agoSuper User
Hello lbendlin
that DAX is superb, thank you.
I dont know if there is a sumx offset at line 6 (maybe) as a "bridge" before sumx the whole result as in Line 8 (thought it can be done directly by using earlier indexing).
I need to work again on my DAX understanding as a beginner.
Again, thank you and really appreciate for the help.
- lbendlin2 years agoSuper User
As always you can approach the issue with different DAX functions but you will want to unlearn EARLIER and embrace the window functions. Makes the shifted reference so much easier.
- lbendlin2 years agoSuper User
Ah, that's actually simple - basically a special case for a Pearson correlation within the column. Let me play with that a bit.