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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
LalaLee
Regular Visitor

Determine Correlation

Hi, 

 

I am trying to determine the correlation between property floor area (in sqm) and the sales price of the property.  I also need to be able to point out which estate where larger size property correlates strongest with higher prices

 

Variables that I have are:

Floor Area Per Property - SQM (num)
Sale Price Per Property - $
Estate - Text

Trans Year - Text

Would you be able to advise me how to do it?  I am totally new to Power BI, would appreciate show and tell kind of solution with screenshot to guide me.

 

1 ACCEPTED SOLUTION

Hi @LalaLee 

There  is a sample pbix attached in my previous post. You can download it and have a look at the calculations.

danextian_0-1732514067509.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
v-kongfanf-msft
Community Support
Community Support

Hi @LalaLee ,

 


Did danextian, Bibiano Geraldo reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best regards,

Adamk Kong

Bibiano_Geraldo
Super User
Super User

Hi @LalaLee ,

To determine correlation in power bi you can Create a Scatter Chart and Drag these fields into the chart:

X-axis: Floor Area Per Property.
Y-axis: Sale Price Per Property.
Legend: Estate.
This chart will show how floor area relates to sales price for each estate

 

To see the correlation coefficient you can reach your goal by this DAX:

Correlation =
VAR MeanX = AVERAGEX(ALL('Table'), 'Table'[Floor Area Per Property])
VAR MeanY = AVERAGEX(ALL('Table'), 'Table'[Sale Price Per Property])
VAR Numerator =
SUMX(
ALL('Table'),
('Table'[Floor Area Per Property] - MeanX) *
('Table'[Sale Price Per Property] - MeanY)
)
VAR Denominator =
SQRT(
SUMX(ALL('Table'),
POWER('Table'[Floor Area Per Property] - MeanX, 2)
) *
SUMX(ALL('Table'),
POWER('Table'[Sale Price Per Property] - MeanY, 2)
)
)
RETURN Numerator / Denominator


To Analyze Correlation Per Estate Create another measure by this DAX:

Correlation Per Estate =
VAR MeanX = AVERAGEX(ALL('Table'), 'Table'[Floor Area Per Property])
VAR MeanY = AVERAGEX(ALL('Table'), 'Table'[Sale Price Per Property])
VAR Numerator =
SUMX(
FILTER(ALL('Table'), 'Table'[Estate] = SELECTEDVALUE('Table'[Estate])),
('Table'[Floor Area Per Property] - MeanX) *
('Table'[Sale Price Per Property] - MeanY)
)
VAR Denominator =
SQRT(
SUMX(FILTER(ALL('Table'), 'Table'[Estate] = SELECTEDVALUE('Table'[Estate])),
POWER('Table'[Floor Area Per Property] - MeanX, 2)
) *
SUMX(FILTER(ALL('Table'), 'Table'[Estate] = SELECTEDVALUE('Table'[Estate])),
POWER('Table'[Sale Price Per Property] - MeanY, 2)
)
)
RETURN Numerator / Denominator

Add a table visual to display Estate and Correlation Per Estate

Add a slicer for Estate to filter data and focus on specific correlations

 

 

Is this post help you? Please consider to:

Accept as Solution!
Give a Kudo
Follow me on Linkedin

danextian
Super User
Super User

Hi @LalaLee 

I am not really familiar with this but I followed the tutorial on this blog post -https://datakuity.com/2021/10/29/correlation-coefficient-in-power-bi-using-dax/ for the attached sample pbix.

danextian_0-1732512157713.png

 

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Apologise, I am totally new to this.  If possible, would appreciate show and tell solution, with screenshots.

Hi @LalaLee 

There  is a sample pbix attached in my previous post. You can download it and have a look at the calculations.

danextian_0-1732514067509.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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