<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Correlation coefficient in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2008108#M736</link>
    <description>&lt;P&gt;Statistics only work with numbers. You need to add numerical key columns for your text columns before you can calculate the correlation.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 11:41:48 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-08-10T11:41:48Z</dc:date>
    <item>
      <title>Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/196274#M21</link>
      <description>&lt;P&gt;The quick measure calculates the Pearson correlation coefficient&amp;nbsp;&lt;SPAN&gt;between two measures&amp;nbsp;within the category.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 id="toc-hId--1323657085"&gt;NAME:&lt;/H4&gt;
&lt;P&gt;Correlation coefficient&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 id="toc-hId-419153250"&gt;DESCRIPTION:&lt;/H4&gt;
&lt;P&gt;Calculate the Pearson correlation coefficient between two measures&amp;nbsp;within the category&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 id="toc-hId--2133003711"&gt;PARAMETERS:&lt;/H4&gt;
&lt;P&gt;Name: Category&lt;/P&gt;
&lt;P&gt;Tooltip: The category in which you want to calculate the&amp;nbsp;correlation coefficient&lt;/P&gt;
&lt;P&gt;Type: Categorical field&lt;/P&gt;
&lt;H4 id="toc-hId--2133003711"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;P&gt;Name:&amp;nbsp;Measure X&lt;/P&gt;
&lt;P&gt;Tooltip: The first measure in a correlation pair&lt;/P&gt;
&lt;P&gt;Type: Numerical field / measure&lt;/P&gt;
&lt;H4 id="toc-hId--2133003711"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;P&gt;Name:&amp;nbsp;Measure&amp;nbsp;Y&lt;/P&gt;
&lt;P&gt;Tooltip: The second measure in a correlation pair&lt;/P&gt;
&lt;P&gt;Type: Numerical field / measure&lt;/P&gt;
&lt;H4 id="toc-hId--390193376"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4 id="toc-hId-1352616959"&gt;DAX:&lt;/H4&gt;
&lt;PRE&gt;Correlation Coefficient :=
VAR Correlation_Table =
    FILTER (
        ADDCOLUMNS (
            VALUES ( {Category} ),
            "Value_X", CALCULATE ( {Measure X} ),
            "Value_Y", CALCULATE ( {Measure Y} )
        ),
        AND (
            NOT ( ISBLANK ( [Value_X] ) ),
            NOT ( ISBLANK ( [Value_Y] ) )
        )
    )
VAR Count_Items =
    COUNTROWS ( Correlation_Table )
VAR Sum_X =
    SUMX ( Correlation_Table, [Value_X] )
VAR Sum_X2 =
    SUMX ( Correlation_Table, [Value_X] ^ 2 )
VAR Sum_Y =
    SUMX ( Correlation_Table, [Value_Y] )
VAR Sum_Y2 =
    SUMX ( Correlation_Table, [Value_Y] ^ 2 )
VAR Sum_XY =
    SUMX ( Correlation_Table, [Value_X] * [Value_Y] )
VAR Pearson_Numerator =
    Count_Items * Sum_XY - Sum_X * Sum_Y
VAR Pearson_Denominator_X =
    Count_Items * Sum_X2 - Sum_X ^ 2
VAR Pearson_Denominator_Y =
    Count_Items * Sum_Y2 - Sum_Y ^ 2
VAR Pearson_Denominator =
    SQRT ( Pearson_Denominator_X * Pearson_Denominator_Y )
RETURN
    DIVIDE ( Pearson_Numerator, Pearson_Denominator )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiMGQ5YzJiYTItZWFiMy00MGI2LTg1NzktYjMwYTU1YjA2N2M3IiwidCI6ImQzMmNkYzNmLTY1NTUtNGNhYy1iYjFhLTg2OWZiMTE0MzRlNSJ9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 06:44:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/196274#M21</guid>
      <dc:creator>Daniil</dc:creator>
      <dc:date>2018-04-13T06:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/304080#M68</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="15597" data-lia-user-login="Daniil" class="lia-mention lia-mention-user"&gt;Daniil&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for this, this a great solution for correlation calculations on DAX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the calculation with different measures and I will add the following improvement. In the following line, you could get a negative number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;VAR Pearson_Denominator =
    SQRT ( Pearson_Denominator_X * Pearson_Denominator_Y )&lt;/PRE&gt;
&lt;P&gt;I suggest this slight modification to run in all scenarios.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;VAR Pearson_Denominator =
    SQRT(ABS( Pearson_Denominator_X * Pearson_Denominator_Y ))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 17:59:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/304080#M68</guid>
      <dc:creator>acanepa</dc:creator>
      <dc:date>2017-11-15T17:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/311026#M69</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hi acanepa&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Good programming practice would suggest avoiding a division by zero, however you need to think like a statistician - which can often be counter intuitive!&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;You actually want the Pearson Coefficient to "fail" when you divide by zero.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;See this post for more info &lt;A href="https://stackoverflow.com/questions/38548343/pearson-correlation-fails-for-perfectly-correlated-sets" target="_blank"&gt;https://stackoverflow.com/questions/38548343/pearson-correlation-fails-for-perfectly-correlated-sets&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;From a DAX point of view the divide function will tolerate a division by zero.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Graeme&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 19:01:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/311026#M69</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-26T19:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/345034#M93</link>
      <description>&lt;P&gt;Very handy addition.&lt;BR /&gt;&lt;BR /&gt;Are there, however, plans to add a measure/some other output feature that will also report on the uncertainty of the Correlation Coefficient calculated for a given series pair (i.e. implementing Fisher's z-transformation and evaluating the confidence interval at difference levels that the user chooses, or just a standard set of levels like 80%, 90 % and 95%)&lt;BR /&gt;&lt;BR /&gt;The risk is that people could state (and frequently do state) correlation coefficients for insufficiently sized samples and derive insights that are actually attributable to noise etc.&lt;BR /&gt;&lt;BR /&gt;Thanks for the awesome work! :smileyvery-happy:&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 06:33:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/345034#M93</guid>
      <dc:creator>ZanderFick</dc:creator>
      <dc:date>2018-01-25T06:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/606094#M284</link>
      <description>&lt;P&gt;Thanks for the formula Daniil. &amp;nbsp;I'm trying to use it to calculate the correlation coefficient on some data I have but I have hit an issue - I only have &lt;STRONG&gt;two&lt;/STRONG&gt; columns of data, one showing the month name and one showing the volume (a measure). &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I.e.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month &amp;nbsp; &amp;nbsp; Volume&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Jan-07 &amp;nbsp; &amp;nbsp; &amp;nbsp;1,000&lt;/P&gt;
&lt;P&gt;Feb-07 &amp;nbsp; &amp;nbsp; 1,613&lt;/P&gt;
&lt;P&gt;Mar-07 &amp;nbsp; &amp;nbsp; 1,128&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have two measures as per your data nor do I have a column showing a 'category'. &amp;nbsp;How would I be able to carry out the calculation for my data please? &amp;nbsp;Do I need to create a new measure column based on the month name, coverting it into a numerical value? &amp;nbsp;(just a guess). &amp;nbsp;Then I would classify the month column as the 'category'? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this is clear (still classing myself as a Power BI newbie!)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lee&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 11:14:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/606094#M284</guid>
      <dc:creator>PowerBI_77</dc:creator>
      <dc:date>2019-01-22T11:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/606584#M285</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="103337" data-lia-user-login="PowerBI_77" class="lia-mention lia-mention-user"&gt;PowerBI_77&lt;/a&gt;&amp;nbsp;please have a look at the second example in my &lt;A href="https://xxlbi.com/blog/simple-linear-regression-in-dax/" target="_self"&gt;Simple Linear Regression&lt;/A&gt; blog -- you can employ a similar technique here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in case people still read this --&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4119" data-lia-user-login="acanepa" class="lia-mention lia-mention-user"&gt;acanepa&lt;/a&gt;&amp;nbsp;said in a private message there "is not an error of the calculation you created but rather an error on my end to feed the formula with wrong numbers", so please ignore his comment about negative numbers.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 22:39:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/606584#M285</guid>
      <dc:creator>Daniil</dc:creator>
      <dc:date>2019-01-22T22:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/982093#M431</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;A little bit stuck on this one...&amp;nbsp; Can someone guide me?I have a data set with the following fields...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Year&lt;/LI&gt;
&lt;LI&gt;Venue&lt;/LI&gt;
&lt;LI&gt;Event Length(in days)&lt;/LI&gt;
&lt;LI&gt;Average Event revenue per day&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to see if there's a correlation between even length and event revenue per day.&amp;nbsp; I thought I could use the year as the category, but I think this might be wrong.&amp;nbsp; Using the Quick Measure, what Category, and 2 measures should I use to establish the hypotheses that "the longer the event, the more/less menoy per day is made"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 13:04:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/982093#M431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-19T13:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/1604186#M659</link>
      <description>&lt;P&gt;This is wonderfully useful thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="15597" data-lia-user-login="Daniil" class="lia-mention lia-mention-user"&gt;Daniil&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I've been trying to modify your DAX to use in a scenario where the variables to be correlated are pivoted and the categories are contained in an attribute column (example below). Sadly I'm not having much luck, does anyone have any suggestions on how to generate a correlation matrix with this data structure?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" style="height: 14.5pt; width: 48pt;"&gt;Item&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Attribute&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;A&lt;/TD&gt;
&lt;TD&gt;Value X&lt;/TD&gt;
&lt;TD align="right"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;B&lt;/TD&gt;
&lt;TD&gt;Value X&lt;/TD&gt;
&lt;TD align="right"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;C&lt;/TD&gt;
&lt;TD&gt;Value X&lt;/TD&gt;
&lt;TD align="right"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;D&lt;/TD&gt;
&lt;TD&gt;Value X&lt;/TD&gt;
&lt;TD align="right"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;A&lt;/TD&gt;
&lt;TD&gt;Value Y&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;B&lt;/TD&gt;
&lt;TD&gt;Value Y&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;C&lt;/TD&gt;
&lt;TD&gt;Value Y&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" style="height: 14.5pt;"&gt;D&lt;/TD&gt;
&lt;TD&gt;Value Y&lt;/TD&gt;
&lt;TD align="right"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Sun, 17 Jan 2021 22:32:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/1604186#M659</guid>
      <dc:creator>systemnova</dc:creator>
      <dc:date>2021-01-17T22:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2008108#M736</link>
      <description>&lt;P&gt;Statistics only work with numbers. You need to add numerical key columns for your text columns before you can calculate the correlation.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 11:41:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2008108#M736</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-08-10T11:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685358#M874</link>
      <description>&lt;P&gt;Apologies for reviving an old question however I want to check your response to systemnova if you wouldn't mind.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Say I wanted to check the correlation between day of the week and temperature and had collected the below data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Temp&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Friday&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Friday&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you saying I can swap the days of the week for a numerical key such as Monday = 1, Wednesday = 2 and Friday = 3 to give the below and then use this quick measure to produce meaningful results? Unfortunately I am still very new to stats and Power BI. Any direction would be greatly appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Temp&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2022 19:59:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685358#M874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-06T19:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685444#M875</link>
      <description>&lt;P&gt;yes, that's what I am saying.&amp;nbsp; Replace text values with their numerical index and compute the correlation over the indexes. Afterwards you can map it back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(bit unfortunate that your sample table has an "Index" column. Please discard that, it doesn't help)&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 01:44:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685444#M875</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-07T01:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685507#M876</link>
      <description>&lt;P&gt;Discard the Index column? I assumed that would be the 'Category' element of the quick measure. Would it be correct to instead have the following, where the elements of the quick measure are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Category = Day of Week column&lt;/P&gt;&lt;P&gt;Measure X = Day of Week Key column&lt;BR /&gt;Measure Y = Temp column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;TD&gt;Day of Week&lt;/TD&gt;&lt;TD&gt;Day of Week&amp;nbsp;Key&lt;/TD&gt;&lt;TD&gt;Temp&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Monday&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Wednesday&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Friday&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Friday&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 07 Aug 2022 07:45:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685507#M876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-07T07:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685579#M877</link>
      <description>&lt;P&gt;Ah, the quick measure. I never understood why they added a category there and made it mandatory. It has (in my opinion) nothing to do with the computation.&amp;nbsp; I always implement the Pearson algorithm manually.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 13:03:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/2685579#M877</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-07T13:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3308899#M989</link>
      <description>&lt;P&gt;Thank you so much for this! Helped out a lot and saved me plenty of time.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 19:18:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3308899#M989</guid>
      <dc:creator>Joey_</dc:creator>
      <dc:date>2023-06-29T19:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917797#M1086</link>
      <description>&lt;P&gt;Sorry to revive an old thread, but I was wondering what the differences were in the DAX Linest and Linestx in calculating the coefficient of detemination. I was using the square for the Pearson coefficient to get R squared. It appears that I am getting different coefficient values between the two functions. I checked in excel and also was getting the same values as the Linest function. Would you happen to know if there are approximations in the Linest function vs your Pearson coefficient?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 15:24:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917797#M1086</guid>
      <dc:creator>dfreeman2</dc:creator>
      <dc:date>2024-05-14T15:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917917#M1087</link>
      <description>&lt;P&gt;Can't see a reason for that, but is likely a question for&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="503" data-lia-user-login="jeffrey_wang" class="lia-mention lia-mention-user"&gt;jeffrey_wang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:14:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917917#M1087</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-14T16:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917931#M1088</link>
      <description>&lt;P&gt;Linest is just a shortcut for LinestX with the &amp;lt;table&amp;gt; argument derived from the column references. The internal algorithm is the same.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:24:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917931#M1088</guid>
      <dc:creator>jeffrey_wang</dc:creator>
      <dc:date>2024-05-14T16:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917941#M1089</link>
      <description>&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/503" target="_blank"&gt;@jeffrey_wang&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The measure forces the data to be summarized. Where Linest and Linestx are using the raw data to determine the best fit line and calculating all the variables. Would appear that for correlation coefficient, this is not a good quick measure, as the R value is skewed without being able to not use a summarization.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:27:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917941#M1089</guid>
      <dc:creator>dfreeman2</dc:creator>
      <dc:date>2024-05-14T16:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation coefficient</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917961#M1091</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Right, I was trying to determine why the Quick measure for Correlation Coefficient is giving an R value that when squared does not match Linest. Since the quick measure is forcing the summarization, it is only an estimated R value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:39:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/3917961#M1091</guid>
      <dc:creator>dfreeman2</dc:creator>
      <dc:date>2024-05-14T16:39:21Z</dc:date>
    </item>
  </channel>
</rss>

