<?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: Subtracting Columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1364085#M24721</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="108403" data-lia-user-login="BICrazy" class="lia-mention lia-mention-user"&gt;BICrazy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is your measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 

VAR CV = MAX(Table1[Value])
VAR D = SELECTEDVALUE(Table1[Day])+1
RETURN
CV-
CALCULATE(
    MAX(Table1[Value]),
    Table1[Day] = D,
    ALLSELECTED(Table1[Day])
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2020 10:20:44 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2020-09-11T10:20:44Z</dc:date>
    <item>
      <title>Subtracting Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1363978#M24720</link>
      <description>&lt;P&gt;Hi there Power BI Community....&amp;nbsp; I need your help, please.&lt;BR /&gt;&lt;BR /&gt;I need to create a measure that subtracts the preceding column from the next and displays the answers only (in bold red below).&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;BR /&gt;1st row:&lt;BR /&gt;May-19&amp;nbsp; &amp;nbsp;14 - 6 = &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;8&lt;/FONT&gt;, &lt;/STRONG&gt;6 - 5 =&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt; 1&lt;/FONT&gt;, &lt;/STRONG&gt;5 - 4=&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;1&lt;/FONT&gt;, &lt;/STRONG&gt;4 - 4=&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0&lt;/FONT&gt;, &lt;/STRONG&gt;4 - 4=&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt; 0&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;2nd Row&lt;BR /&gt;Jun -19&amp;nbsp; &amp;nbsp;158 - 123= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;35&lt;/STRONG&gt;&lt;/FONT&gt;, 123 - 115= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/FONT&gt;, 115 - 101 = &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;14&lt;/FONT&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and so forth for each row and column.&lt;BR /&gt;&lt;BR /&gt;Here's a Matrix view of the data.&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 09:44:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1363978#M24720</guid>
      <dc:creator>BICrazy</dc:creator>
      <dc:date>2020-09-11T09:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1364085#M24721</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="108403" data-lia-user-login="BICrazy" class="lia-mention lia-mention-user"&gt;BICrazy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is your measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 

VAR CV = MAX(Table1[Value])
VAR D = SELECTEDVALUE(Table1[Day])+1
RETURN
CV-
CALCULATE(
    MAX(Table1[Value]),
    Table1[Day] = D,
    ALLSELECTED(Table1[Day])
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 10:20:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1364085#M24721</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-09-11T10:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting Columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1364150#M24723</link>
      <description>&lt;P&gt;Thanks Fowmy,&lt;BR /&gt;&lt;BR /&gt;The measure worked like a charm. I just inserted the portion to accommodate the blanks on my data set.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Previous Index Policies = 
VAR CV = [Bank Submissions]
VAR D = SELECTEDVALUE('Ongoing &amp;amp; Unpaid Data Revised'[Index])+1
RETURN
CV-
CALCULATE(
    [Bank Submissions],
    'Ongoing &amp;amp; Unpaid Data Revised'[Index] = D &amp;amp;&amp;amp; CV &amp;lt;&amp;gt; BLANK(),
    ALLSELECTED('Ongoing &amp;amp; Unpaid Data Revised'[Index]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 11:02:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-Columns/m-p/1364150#M24723</guid>
      <dc:creator>BICrazy</dc:creator>
      <dc:date>2020-09-11T11:02:44Z</dc:date>
    </item>
  </channel>
</rss>

