<?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 Is it possible to subtract two selectedmeasure in calculated group? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3238737#M119111</link>
    <description>&lt;P&gt;Matrix is using a calculated group. A and B are two different measures. Is it possible to have a calculated item that does A-B?&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 19:43:33 GMT</pubDate>
    <dc:creator>shooyi</dc:creator>
    <dc:date>2023-05-16T19:43:33Z</dc:date>
    <item>
      <title>Is it possible to subtract two selectedmeasure in calculated group?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3238737#M119111</link>
      <description>&lt;P&gt;Matrix is using a calculated group. A and B are two different measures. Is it possible to have a calculated item that does A-B?&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 19:43:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3238737#M119111</guid>
      <dc:creator>shooyi</dc:creator>
      <dc:date>2023-05-16T19:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to subtract two selectedmeasure in calculated group?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3239141#M119134</link>
      <description>&lt;P&gt;Hello shooyi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you looking for it to subtract A and B specifically? Does Measure = A - B not work? I must be missing something here!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;----------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 01:36:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3239141#M119134</guid>
      <dc:creator>Wilson_</dc:creator>
      <dc:date>2023-05-17T01:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to subtract two selectedmeasure in calculated group?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3239824#M119164</link>
      <description>&lt;P&gt;Hi Wilson&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a calculated group because I needed the same 5 custom calculations applied to whatever measure I drop in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is in the table is the YoY %. So A is the YoY growth for measure A and B is the YoY growth for measure B for a client defined time metric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need A and B to able to be applied to the sum of any column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A could be the sum(company_a_sales) or sum(company_a_units)&lt;/P&gt;&lt;P&gt;B could be the sum(company_b_sales) or sum(company_b_units)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I was trying to do is the 5 custom calculations (client defined rolling metrics a, b, c, d, e) and have it use selectedmeasure() instead of creating 30 measures.&lt;/P&gt;&lt;P&gt;So I would be able to use :&lt;/P&gt;&lt;P&gt;rolling_metric_a - using selectedmeasure()&lt;/P&gt;&lt;P&gt;as opposed to&lt;/P&gt;&lt;P&gt;rolling_metric_a for each column&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;year&lt;/TD&gt;&lt;TD&gt;week&lt;/TD&gt;&lt;TD&gt;product&lt;/TD&gt;&lt;TD&gt;company_a_sales&lt;/TD&gt;&lt;TD&gt;company_a_units&lt;/TD&gt;&lt;TD&gt;company_b_sales&lt;/TD&gt;&lt;TD&gt;company_b_units&lt;/TD&gt;&lt;TD&gt;company_c_sales&lt;/TD&gt;&lt;TD&gt;company_c_units&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;xx&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;53&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;78&lt;/TD&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;yy&lt;/TD&gt;&lt;TD&gt;321&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;TD&gt;654&lt;/TD&gt;&lt;TD&gt;87&lt;/TD&gt;&lt;TD&gt;987&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;xx&lt;/TD&gt;&lt;TD&gt;852&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;147&lt;/TD&gt;&lt;TD&gt;41&lt;/TD&gt;&lt;TD&gt;369&lt;/TD&gt;&lt;TD&gt;63&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;yy&lt;/TD&gt;&lt;TD&gt;963&lt;/TD&gt;&lt;TD&gt;63&lt;/TD&gt;&lt;TD&gt;753&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;TD&gt;159&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works just fine. Now I need to be able to subtract the two. So in the original post that is the rolling_metric_a applied to sum(company_a_sales) and sum(company_b_sales).&lt;/P&gt;&lt;P&gt;I now need the difference between the two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a calculated item that subtracts the two?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 09:15:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-subtract-two-selectedmeasure-in-calculated/m-p/3239824#M119164</guid>
      <dc:creator>shooyi</dc:creator>
      <dc:date>2023-05-17T09:15:13Z</dc:date>
    </item>
  </channel>
</rss>

