<?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: Calculated column from two columns to add previous rows only if first column value is 0 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234325#M118819</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="560022" data-lia-user-login="AdityaG" class="lia-mention lia-mention-user"&gt;AdityaG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry that you had to face such technical issues. Please do not misunderstand my message. This is just to help supporting you in the best way.&amp;nbsp;&lt;BR /&gt;Please let me know if your problem has been sorted our or you still need any support.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 14 May 2023 16:08:39 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-05-14T16:08:39Z</dc:date>
    <item>
      <title>Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234158#M118780</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following problem to be calculated in PowerBI, either through DAX or power query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Q1-23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q2-23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;429&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q3-23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;429&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q4-23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;431&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q1-24&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;434&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;434&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q2-24&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;434&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q3-24&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;438&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q4-24&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;0&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;441&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second and third are input columns, and the fourth one is output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Excel, the fourth column is prepared as:&lt;/P&gt;&lt;P&gt;if(B2&amp;gt;0, B2, C2+D1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if its possible in PowerBI. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 06:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234158#M118780</guid>
      <dc:creator>AdityaG</dc:creator>
      <dc:date>2023-05-14T06:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234167#M118781</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;LI-CODE lang="markup"&gt;Expected result CC =
VAR _result =
    SUMX (
        FILTER (
            ADDCOLUMNS ( Data, "@total", IF ( Data[Value] &amp;lt;&amp;gt; 0, Data[Value], Data[Add] ) ),
            RIGHT ( Data[Quarter-Year], 2 ) = RIGHT ( EARLIER ( Data[Quarter-Year] ), 2 )
                &amp;amp;&amp;amp; RIGHT ( LEFT ( Data[Quarter-Year], 2 ), 1 )
                    &amp;lt;= RIGHT ( LEFT ( EARLIER ( Data[Quarter-Year] ), 2 ), 1 )
        ),
        [@total]
    )
RETURN
    _result
&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 14 May 2023 08:05:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234167#M118781</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-05-14T08:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234230#M118796</link>
      <description>&lt;P&gt;Can you consider taking index numbers instead of quarters.... and try if its possible to replicate the Excel function mentioned above: if(B2&amp;gt;0,B2,C2+D1)&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 11:54:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234230#M118796</guid>
      <dc:creator>AdityaG</dc:creator>
      <dc:date>2023-05-14T11:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234237#M118798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your message.&lt;/P&gt;
&lt;P&gt;Please provide a sample with index numbers, and then I can try to look into it.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 12:01:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234237#M118798</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-05-14T12:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234238#M118799</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Reply-to-earlier-post-on-calculated-column-from-two-col-to-add/m-p/3234196#M118793" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Reply-to-earlier-post-on-calculated-column-from-two-col-to-add/m-p/3234196#M118793&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you check this link, somehow replies are getting deleted as soon as I add a table&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 12:03:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234238#M118799</guid>
      <dc:creator>AdityaG</dc:creator>
      <dc:date>2023-05-14T12:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234317#M118816</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="560022" data-lia-user-login="AdityaG" class="lia-mention lia-mention-user"&gt;AdityaG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting your question and for being a regular visitor to this platform. &lt;BR /&gt;I would kindly request you to advise what exactly is the issue with&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;'s solution and avoid providing guiding instructions that the solution provider cannot just follow blindly. In other words it would be really appreciated if you provide clear picture of you data model and the expected results rather than trying to over simplify the problem. Allways remember that the solution provider has his own methods and approaches, therefore providing guidance on how to obtain the expected results will only create confusion. Appreciate your understanding.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 15:46:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234317#M118816</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-14T15:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234319#M118817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, I have created another post and sent the link (please check the subsequent replies as well). The problem is this interface is too buggy, it automatically deletes the replies whenever I'm adding sample data, and sometimes it does not accept the message due to an invalid HTML error. I try to be very exhaustive with what the problem is (you can see that in the link I sent to him as well).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies from my side, and let me know how can I avoid such errors (if there's a thread made on this, would really appreciate it if you could share the link). I'm kinda new to this community too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 15:55:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234319#M118817</guid>
      <dc:creator>AdityaG</dc:creator>
      <dc:date>2023-05-14T15:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column from two columns to add previous rows only if first column value is 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234325#M118819</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="560022" data-lia-user-login="AdityaG" class="lia-mention lia-mention-user"&gt;AdityaG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry that you had to face such technical issues. Please do not misunderstand my message. This is just to help supporting you in the best way.&amp;nbsp;&lt;BR /&gt;Please let me know if your problem has been sorted our or you still need any support.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 16:08:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-from-two-columns-to-add-previous-rows-only-if/m-p/3234325#M118819</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-14T16:08:39Z</dc:date>
    </item>
  </channel>
</rss>

