<?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: DAX: Referencing the previous row within the same Calculated Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2021987#M45088</link>
    <description>&lt;P&gt;Hello , were you able to solve this problem. I am in a similar boat and have been clinging to this problem since weeks.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 20:16:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-17T20:16:37Z</dc:date>
    <item>
      <title>DAX: Referencing the previous row within the same Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2013113#M44747</link>
      <description>&lt;P&gt;I am currently trying to create a calculated column whereby the first value in the row is the basis for the calculation, and the rest of the values in the column are built off of this value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand if this is even possible in Power BI, but because it is doable in Excel, I would imagine that there is some sort of solution to this query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the screeshot below, you'll notice the starting value for the calculated column needs to be the value that the arrow is pointing to (this will be a static value that I can plug in using the associated date, May 2016, as the parameter), which then needs to be used to build the value in the next row and so forth.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hoping someone can offer some advice or shed some light on how possible it is. Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 13:01:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2013113#M44747</guid>
      <dc:creator>ktb2296</dc:creator>
      <dc:date>2021-08-12T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: Referencing the previous row within the same Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2014480#M44803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="215581" data-lia-user-login="ktb2296" class="lia-mention lia-mention-user"&gt;ktb2296&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm not sure how do you want to use the First row value to calculate the other columns/rows value, but to find the first value in the column you can use the "&lt;SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/firstnonblank-function-dax" target="_self"&gt;FIRSTNONBLANK&lt;/A&gt;" formula in DAX.&lt;BR /&gt;&lt;BR /&gt;For your model you can use this code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;First Value = 
FIRSTNONBLANK ( 'Table (2)'[Revised rent], MAX ( 'Table (2)'[Revised rent] ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the output will be like below, and you can use that measure to create that calculated column:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an another example, to find the first value in the&amp;nbsp;&lt;SPAN&gt;Monthly Average&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;column, use the below code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;because the first row in that column is empty, it shows the second row.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;!!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 05:57:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2014480#M44803</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-08-13T05:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: Referencing the previous row within the same Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2015411#M44828</link>
      <description>&lt;P&gt;HI Vahid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't really answer the full query. Essentially the first row, or May 2016, will be 135 (&lt;STRONG&gt;Variable x&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then to get the next value for June 2016, in the same column, I need to use this equation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1-ABS(0.5-NORM.Dist( Monthly Average , &lt;STRONG&gt;Variable X&lt;/STRONG&gt;, Measure 1, TRUE) = &lt;STRONG&gt;Variable Y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then to get the value for July 2016:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1-ABS(0.5-NORM.Dist( Monthly Average , &lt;STRONG&gt;Variable Y&lt;/STRONG&gt;, Measure 1, TRUE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This needs to continue on for the whole calculated column. So that's why I'm wondering if it's possible to calculate a column where each row will need to take the previous calculated row's value.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 13:32:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2015411#M44828</guid>
      <dc:creator>ktb2296</dc:creator>
      <dc:date>2021-08-13T13:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: Referencing the previous row within the same Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2021987#M45088</link>
      <description>&lt;P&gt;Hello , were you able to solve this problem. I am in a similar boat and have been clinging to this problem since weeks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 20:16:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Referencing-the-previous-row-within-the-same-Calculated/m-p/2021987#M45088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-17T20:16:37Z</dc:date>
    </item>
  </channel>
</rss>

