Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello Power BI expert,
I need an advice on how to do autocorrelation calculation in Power BI.
for now i am trying to replicate the result from excel tutorial.
I read there are two ways of calculation autocorrelation:
1. Using OFFSET and DEVSQ
2. Using VAR.P
Here is the website link that i currently work on to replicate the result How to Calculate Autocorrelation in Excel - Sheetaki
Is it possible to re-create what the excel did in Power BI? I tried to make it myself but the result is different.
Thank you and really appreciate for the help.
Solved! Go to Solution.
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-...
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/1447...
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.
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.
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.
hello @lbendlin
sorry in advance, i got another question, is it possible to put the measure (the correlation result) into a new column?
Thank you and appreciate for the help.
You cannot create columns from measures. You would need to modify the code to create a calculated column instead
Ah, that's actually simple - basically a special case for a Pearson correlation within the column. Let me play with that a bit.
User | Count |
---|---|
65 | |
46 | |
20 | |
18 | |
15 |
User | Count |
---|---|
119 | |
41 | |
40 | |
28 | |
22 |