<?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: Need IF statement to add 1 to the column instead of overwriting with the value of 1 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996606#M12534</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="218453" data-lia-user-login="flent" class="lia-mention lia-mention-user"&gt;flent&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think DAX will help you here due to the recursive nature of your requirement. However, Power Query/M Language can perform recursive functions e.g.&amp;nbsp;&lt;A href="https://www.poweredsolutions.co/2019/07/01/recursive-functions-in-power-bi-power-query/" target="_blank"&gt;https://www.poweredsolutions.co/2019/07/01/recursive-functions-in-power-bi-power-query/.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry this isn't an instant solution to your query, but hopefully it gets you pointed in the right direction knowing that there is potentially a way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Sat, 28 Mar 2020 16:36:15 GMT</pubDate>
    <dc:creator>BA_Pete</dc:creator>
    <dc:date>2020-03-28T16:36:15Z</dc:date>
    <item>
      <title>Need IF statement to add 1 to the column instead of overwriting with the value of 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996561#M12532</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I come from a background in R so this may not be a feature in Power BI but I am hoping that is not the case.&amp;nbsp; I need to create a column using an IF statement, and I want the value of this new column to increase by 1 every time the condition is met and do nothing when the condition is not met.&amp;nbsp; I have tried IF(logical_operator, +1) but it still seems to be overwriting the previous data in the column, not adding 1 to the existing value of the cell.&amp;nbsp; Any help would be greatly appreciated, I have searched near and far for this answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 15:45:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996561#M12532</guid>
      <dc:creator>flent</dc:creator>
      <dc:date>2020-03-28T15:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need IF statement to add 1 to the column instead of overwriting with the value of 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996606#M12534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="218453" data-lia-user-login="flent" class="lia-mention lia-mention-user"&gt;flent&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think DAX will help you here due to the recursive nature of your requirement. However, Power Query/M Language can perform recursive functions e.g.&amp;nbsp;&lt;A href="https://www.poweredsolutions.co/2019/07/01/recursive-functions-in-power-bi-power-query/" target="_blank"&gt;https://www.poweredsolutions.co/2019/07/01/recursive-functions-in-power-bi-power-query/.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry this isn't an instant solution to your query, but hopefully it gets you pointed in the right direction knowing that there is potentially a way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 16:36:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996606#M12534</guid>
      <dc:creator>BA_Pete</dc:creator>
      <dc:date>2020-03-28T16:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need IF statement to add 1 to the column instead of overwriting with the value of 1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996650#M12535</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="218453" data-lia-user-login="flent" class="lia-mention lia-mention-user"&gt;flent&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use RANKX in the calculated column, together with a row-level condition I can achieve what you are looking for, if I understand correctly of course.&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;So in this case the rows where the condition is not met, there is no value. The rank is now based on the Index column, but that could be any column of course.&amp;nbsp;&lt;/P&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;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 18:00:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-IF-statement-to-add-1-to-the-column-instead-of-overwriting/m-p/996650#M12535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-28T18:00:05Z</dc:date>
    </item>
  </channel>
</rss>

