Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Irwan
Super User
Super User

Need Help on Autocorrelation Calculation

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.

Irwan_0-1702511735040.png

I read there are two ways of calculation autocorrelation:

1. Using OFFSET and DEVSQ

Irwan_2-1702511938532.png

2. Using VAR.P

Irwan_1-1702511885274.png

 

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.

Irwan_3-1702512715107.png

 

Thank you and really appreciate for the help.

1 ACCEPTED SOLUTION

Here you go

 

lbendlin_0-1702784874050.png

 

View solution in original post

9 REPLIES 9
lbendlin
Super User
Super User

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).

Jan56
Feb58
Mar69
Apr50
May66
Jun68
Jul78
Aug73
Sept88
Oct90

 Here is the result that I wish to get in Power BI

Irwan_0-1702773676099.png

 

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.

Here you go

 

lbendlin_0-1702784874050.png

 

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

Hello @lbendlin 

 

alright then, thank you again for the help and support.

Ah, that's actually simple - basically a special case for a Pearson correlation within the column.  Let me play with that a bit.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.