Forum Discussion

gn's avatar
gn
Frequent Visitor
5 years ago
Solved

Show correlation coefficient between two variables

Hello,

 

I'd like to crease a measure which displays the correlation coefficient between two measures, the difficult part here is that I would like the two measures to be chosen dynamically (i.e. user chooses the first from the list of 20 variables, then chooses the second from the list of 20 variables, and the correlation coefficient is displayed). Is this possible to do in power BI itself or would I have to create a new table with the correlation coefficients already calculated?

 

Thanks, Greg

5 Replies

  • gn's avatar
    gn
    Frequent Visitor

    Here is the sample data, let me know if this helps! I know the text format is not good but I was having issues for 10 minutes trying to post it as a table, its a pretty generic format.

     

    Var1 Var2 Var3 Var4 Var5 Var6 Var7
    57.7 66.3 56.9 56.8 56.3 56.7 57.3
    58.2 68.2 56.3 56.0 57.1 60.4 56.9
    59.1 68.3 59.4 57.0 55.1 62.3 58.8
    59.3 67.4 58.3 59.0 55.0 62.3 58.2
    60.8 66.6 61.0 61.8 56.8 59.5 59.8
    60.6 65.4 61.6 63.5 54.6 57.6 60.5
    59.3 66.8 60.0 63.2 53.2 53.5 58.2
    58.8 68.1 60.1 62.4 51.8 52.9 58.4
    58.0 70.6 58.5 61.8 48.7 53.6 57.7
    57.0 70.8 56.2 58.8 50.7 54.2 55.8
    55.8 68.4 54.3 55.7 50.9 56.9 54.4
    55.5 64.4 54.0 55.3 53.4 55.4 53.7
    55.5 64.5 53.3 55.4 54.6 54.7 53.4
    55.9 63.1 54.0 57.5 53.8 53.8 54.0
    57.0 64.9 54.9 60.0 51.7 56.3 55.6
    56.9 67.6 55.6 59.5 49.6 56.5 55.4
    56.8 65.1 54.9 60.5 48.6 57.7 55.4
    56.1 62.9 55.9 58.4 49.0 57.2 55.1
    56.0 63.6 56.8 58.3 49.5 53.7 55.9
    56.9 65.6 56.7 60.4 50.8 52.5 57.6
    56.9 65.3 57.5 60.0 51.4 51.7 57.2
    57.4 68.5 56.1 61.1 50.5 53.8 58.3
    57.8 66.2 55.0 61.0 54.4 55.2 57.8
    57.4 64.4 52.6 60.8 54.8 57.4 56.4

  • gn easier would be have data in excel file and also share the expected output, you can share the file using one drive/google drive