<?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: Find the Power Law (or log) relationship between two variables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392137#M62264</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356641" data-lia-user-login="ChPetru" class="lia-mention lia-mention-user"&gt;ChPetru&lt;/a&gt;&amp;nbsp;Well, I believe the formula for Power Law is:&lt;/P&gt;
&lt;P&gt;n = (logT2 - logT1) / (logM2 - logM1) is that what you are looking for? Here is a good paper on the math involved.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.physics.pomona.edu/sixideas/old/labs/LRM/LR05.pdf?msclkid=67e892a1a38611ec867f8c80f6eb72aa" target="_blank"&gt;LR05/PowerLaw (pomona.edu)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also might consider Runge-Kutta for finding unknown values:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Runge-Kutta/m-p/411280#M149" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Runge-Kutta/m-p/411280#M149&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2022 11:08:55 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2022-03-14T11:08:55Z</dc:date>
    <item>
      <title>Find the Power Law (or log) relationship between two variables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2391796#M62229</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find a constant (equation) that describes the non-linear proportionality between two variables (below).&lt;/P&gt;&lt;P&gt;I need this constant because I am multiplying the second (Y) variable with a number, and want to see the corresponding X values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: Y is 84,91% and X is 0.03. What would X be if Y would be 86%?&lt;/P&gt;&lt;P&gt;I can calculate this in excel by making a power law graphical trendline and use the trendline the equation as multiplier with Y values to get aproximate X.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second question, how can I make a power law or log trendline in Powerbi? I can only see the linear trendline..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Y&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 09:08:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2391796#M62229</guid>
      <dc:creator>ChPetru</dc:creator>
      <dc:date>2022-03-14T09:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Power Law (or log) relationship between two variables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392137#M62264</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356641" data-lia-user-login="ChPetru" class="lia-mention lia-mention-user"&gt;ChPetru&lt;/a&gt;&amp;nbsp;Well, I believe the formula for Power Law is:&lt;/P&gt;
&lt;P&gt;n = (logT2 - logT1) / (logM2 - logM1) is that what you are looking for? Here is a good paper on the math involved.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.physics.pomona.edu/sixideas/old/labs/LRM/LR05.pdf?msclkid=67e892a1a38611ec867f8c80f6eb72aa" target="_blank"&gt;LR05/PowerLaw (pomona.edu)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also might consider Runge-Kutta for finding unknown values:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Runge-Kutta/m-p/411280#M149" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Runge-Kutta/m-p/411280#M149&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 11:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392137#M62264</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-03-14T11:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Power Law (or log) relationship between two variables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392213#M62267</link>
      <description>&lt;P&gt;Hi, there isn't a default equation in DAX or setting in the line chart that will help you do that. There is, however a lot of guidance online that can tell you how to calculate a straight line gradient / regression. See this great example here: &lt;A href="https://xxlbi.com/blog/simple-linear-regression-in-dax/" target="_blank"&gt;https://xxlbi.com/blog/simple-linear-regression-in-dax/.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This can be applied to the logs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The logs of your X / Y values have a linear relationship which looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the guidance in the blog, I can apply the linear logic to those logs and calculate a straight line relationship:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Applying I can then reverse this estimated log of Y back into a predicted value for Y and fit a curve on the XY chart:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;My expressions are as follows:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EstY = 10^('Table'[EstLogY])

EstLogY = 
VAR Known =
    FILTER (
        SELECTCOLUMNS (
            ALLSELECTED ( 'Table' ),
            "Known[X]", 'Table'[logX],
            "Known[Y]", 'Table'[logY]
        ),
        AND (
            NOT ( ISBLANK ( Known[X] ) ),
            NOT ( ISBLANK ( Known[Y] ) )
        )
    )
VAR Count_Items =
    COUNTROWS ( Known )
VAR Sum_X =
    SUMX ( Known, Known[X] )
VAR Sum_X2 =
    SUMX ( Known, Known[X] ^ 2 )
VAR Sum_Y =
    SUMX ( Known, Known[Y] )
VAR Sum_XY =
    SUMX ( Known, Known[X] * Known[Y] )
VAR Average_X =
    AVERAGEX ( Known, Known[X] )
VAR Average_Y =
    AVERAGEX ( Known, Known[Y] )
VAR Slope =
    DIVIDE (
        Count_Items * Sum_XY - Sum_X * Sum_Y,
        Count_Items * Sum_X2 - Sum_X ^ 2
    )
VAR Intercept =
    Average_Y - Slope * Average_X
RETURN 
   SUMX (
        DISTINCT ( 'Table'[Index]),
        Intercept + Slope * 'Table'[lnX]    )



&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pi Eye &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 11:35:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392213#M62267</guid>
      <dc:creator>PiEye</dc:creator>
      <dc:date>2022-03-14T11:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Power Law (or log) relationship between two variables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392246#M62269</link>
      <description>&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 11:51:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392246#M62269</guid>
      <dc:creator>ChPetru</dc:creator>
      <dc:date>2022-03-14T11:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Power Law (or log) relationship between two variables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392500#M62282</link>
      <description>&lt;P&gt;Welcome!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 13:20:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-Power-Law-or-log-relationship-between-two-variables/m-p/2392500#M62282</guid>
      <dc:creator>PiEye</dc:creator>
      <dc:date>2022-03-14T13:20:57Z</dc:date>
    </item>
  </channel>
</rss>

