<?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 Syntax to calculate the delta of values between rows by another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212626#M117208</link>
    <description>&lt;P&gt;Appreciate the response! I'm actually working within Excel's data model and trying to recreate the view with DAX in the linked image below which shows the unit delta between scenarios. (and additionally could add Revenue, Price deltas etc as well).&amp;nbsp;&lt;A href="https://i.stack.imgur.com/VZoCC.png" target="_self"&gt;Pivot Table View&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The view you show in Power BI is close, except difficult to read with the Deltas being shown as a column and duplicated, vs being shown as third row beneath Scenario 2.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Apr 2023 03:39:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-30T03:39:00Z</dc:date>
    <item>
      <title>DAX Syntax to calculate the delta of values between rows by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3208090#M116927</link>
      <description>&lt;P&gt;New to DAX. I have a single values column (Units)&amp;nbsp; and another column with Scenario. . I am trying to create a DAX calc that subtracts Scenario 1 from Scenario 2 on each line item.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my data table below as well as a screenshot of the pivot table view I'm trying to recreate (&lt;A href="https://i.stack.imgur.com/VZoCC.png" target="_self"&gt;Pivot Table View)&lt;/A&gt;, specifically the Deltas section, but would like to leverage DAX. Currently, I'm using power query to create calculated columns for the Deltas to create a new scenario called Deltas, then stitching it as a third scenario. This is resource intensive when done over many columns/rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Scenario&lt;/TD&gt;&lt;TD&gt;Quarter&lt;/TD&gt;&lt;TD&gt;Units&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer A&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;55&lt;/TD&gt;&lt;TD&gt;$49.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer B&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;81&lt;/TD&gt;&lt;TD&gt;$77.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer C&lt;/TD&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;$98.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer A&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;98&lt;/TD&gt;&lt;TD&gt;$62.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer B&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;67&lt;/TD&gt;&lt;TD&gt;$61.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer C&lt;/TD&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;Scenario 1&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;78&lt;/TD&gt;&lt;TD&gt;$8.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer A&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;38&lt;/TD&gt;&lt;TD&gt;$45.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer B&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;TD&gt;$79.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer C&lt;/TD&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ1-23&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;TD&gt;$22.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer A&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;79&lt;/TD&gt;&lt;TD&gt;$90.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer B&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;39&lt;/TD&gt;&lt;TD&gt;$74.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Customer C&lt;/TD&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;Scenario 2&lt;/TD&gt;&lt;TD&gt;CQ2-23&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;$79.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 27 Apr 2023 15:21:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3208090#M116927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-27T15:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Syntax to calculate the delta of values between rows by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212473#M117203</link>
      <description>&lt;LI-CODE lang="markup"&gt;I am trying to create a DAX calc that subtracts Scenario 1 from Scenario 2 on each line item. &lt;/LI-CODE&gt;
&lt;P&gt;Please define what you mean by "line item". Power BI aggregates everything automatically, and the only way to prevent that is to have unique values in each line - which you don't have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than that you can use filters to calculate the required measure&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;</description>
      <pubDate>Sat, 29 Apr 2023 22:13:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212473#M117203</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-04-29T22:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Syntax to calculate the delta of values between rows by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212626#M117208</link>
      <description>&lt;P&gt;Appreciate the response! I'm actually working within Excel's data model and trying to recreate the view with DAX in the linked image below which shows the unit delta between scenarios. (and additionally could add Revenue, Price deltas etc as well).&amp;nbsp;&lt;A href="https://i.stack.imgur.com/VZoCC.png" target="_self"&gt;Pivot Table View&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The view you show in Power BI is close, except difficult to read with the Deltas being shown as a column and duplicated, vs being shown as third row beneath Scenario 2.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 03:39:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212626#M117208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-30T03:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Syntax to calculate the delta of values between rows by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212842#M117230</link>
      <description>&lt;P&gt;Your desired outcome is a little contrary to Power BI's philosophy.&amp;nbsp; You might be better off if you continue to use Excel for that.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 16:54:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Syntax-to-calculate-the-delta-of-values-between-rows-by/m-p/3212842#M117230</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-04-30T16:54:39Z</dc:date>
    </item>
  </channel>
</rss>

