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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

Using the two columns of data with the highest correlation in/for other calculations.

Is there a way that I can:

Have 5 sets of 2 columns. (Separate tables or not, doesn't matter)

Calculate the R value for each pair of columns.

Automatically find which is the highest R value and use the related data (the two columns used to calculate the highest Rvalue) in another calculation? Perhaps save it to a measure or something?

For example, with reference to the dummy table below:


Columns 1 & A correlation is calculated to be R1, correlation for columns 2 & A is R2 etc.

Auto find the highest R value out of the 5 calculated R values (R1, R2, R3R4 or R5).

Use only the respective numbered column (1,2,3,4 or 5) and column A in other measures or calculations etc.

Such as plot them to a graph, find max value or divide one by the other, this last part doesn't matter and will change with my needs, I do not require assistance with this part. If there is a measure or dax code that can do what I need just leave this open ended or put any calculation in there please, such as divide column 1 (or 2,3,4,5 if they have the highest correlation with column A) by column A.

Thank you in advance.


 R1 R2 R3 R4 R5 


 The R values are not actually at the top of this data, they are just shown here to show their corresponding columns.

Solution Sage
Solution Sage

If you don't get answers for a long time... it means your question is not clear. Since you're a new member, please familiarize yourself with this first: How to Get Your Question Answered Quickly - Microsoft Power BI Community

And then rephrase your question to be understandable. Thanks.

Frequent Visitor

Thanks, I did read this beforehand, I have tried to rephrase, unfortunately I am struggling with the explanation and have no other data or formulas to provide.

I can calculate all of this in excel quite easily but need it to be dynamic in Power bi as the columns of data can change. Hopefully my rewording is better.

Helpful resources

Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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