<?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: How to calculate the difference between one field with two different filters? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1287759#M22089</link>
    <description>&lt;P&gt;Thank you for the file, but I'm getting an error when I try to open it with Power BI Desktop: "Object reference not set to an instance of an object."&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 14:09:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-11T14:09:33Z</dc:date>
    <item>
      <title>How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285509#M22001</link>
      <description>&lt;P&gt;We have two instances of a fieldon our report (from a single table), each one with its own slicer. We can select a filter value for each instance and display the value, but we're unable to display the difference between the two values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seemed that we were getting close once we edited the interaction to make sure that each of the field was only interacting with a single slicer. But the measure that should be returning the value associated with one of the selected filter is not using the measure. We're trying to avoid using a second copy of the data table on the report. Is it possible to accomplish what we're attempting? I'm attaching a simplified version of our sample table and report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:28:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285509#M22001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-10T21:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285538#M22002</link>
      <description>&lt;P&gt;Follow up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't attach the file, so here's the link to Dropbox&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/d0scgmfl8cjctgh/sample%20problem.zip?dl=0" target="_blank"&gt;https://www.dropbox.com/s/d0scgmfl8cjctgh/sample%20problem.zip?dl=0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285538#M22002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-10T21:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285941#M22013</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , if they two countries from the same column then try this approach of date , on connected and one disconnected table approach.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 02:32:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1285941#M22013</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-11T02:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1286196#M22026</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;uploaded the file for you here.&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1FU2znT-Oa9_4d3Zpduo4NQXaLZm89o_e/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1FU2znT-Oa9_4d3Zpduo4NQXaLZm89o_e/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 04:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1286196#M22026</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-08-11T04:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1287759#M22089</link>
      <description>&lt;P&gt;Thank you for the file, but I'm getting an error when I try to open it with Power BI Desktop: "Object reference not set to an instance of an object."&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 14:09:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1287759#M22089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-11T14:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1287857#M22093</link>
      <description>&lt;P&gt;That's wierd, I will just post the measures here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Country_1_Selected = SELECTEDVALUE( Sheet1[Country] )&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;Country_2_selected = SELECTEDVALUE( 'Table'[Country] )&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;Sales1 =
VAR Country1 =
    SELECTEDVALUE ( Sheet1[Country] )
VAR Result =
    CALCULATE ( SUM ( Sheet1[Sales] ), Sheet1[Country] = Country1 )
RETURN
    Result&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;Sales2 =
VAR Country2 =
    SELECTEDVALUE ( 'Table'[Country] )
VAR Result =
    CALCULATE ( SUM ( Sheet1[Sales] ), Sheet1[Country] = Country2 )
RETURN
    Result&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;Sales_Diff = [Sales1] - [Sales2]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 14:38:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1287857#M22093</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-08-11T14:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the difference between one field with two different filters?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1288027#M22099</link>
      <description>&lt;P&gt;Got it.&lt;/P&gt;&lt;P&gt;I understand what you're doing. I suspected we were going to need a copy of the Country table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have one more question about something odd. The two measures for Sum (Sales1 and Sales2) are returning (Blank) in the report. I saw the same problem yesterday, which is why I converted the Sum to a Lookup. Do you see anything that would be preventing the Sum from returning a value? There are no blank rows, and the data type is decimal.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 15:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-difference-between-one-field-with-two/m-p/1288027#M22099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-11T15:27:14Z</dc:date>
    </item>
  </channel>
</rss>

