<?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: Trying to get the difference between two measure values using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581359#M74073</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I can check it out but ask for some data , like you are working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if it's excel with made up info it's fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2022 20:59:56 GMT</pubDate>
    <dc:creator>Whitewater100</dc:creator>
    <dc:date>2022-06-15T20:59:56Z</dc:date>
    <item>
      <title>Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581136#M74059</link>
      <description>&lt;P&gt;I will like to get the difference between two measure values using DAX&lt;/P&gt;&lt;P&gt;AADPMAU_Increase = [AADPMAU_End] - [AADPMAU_Start]&lt;/P&gt;&lt;P&gt;But when I do the subtraction, I am getting 0&lt;/P&gt;&lt;P&gt;I have tried different things, but nothing is working&lt;/P&gt;&lt;P&gt;The two values are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;start&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;values that are set by date selector filters. It appears that the calculation is always treating both as equal therefore returning 0&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AADPMAU_Start = CALCULATE(AADPTable[AADPMAU_Sum],FILTER(DimDate,DimDate[StartDate] = DimDate[StartDate]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;AADPMAU_End = CALCULATE(AADPTable[AADPMAU_Sum],FILTER(DimDate,DimDate[EndDate] = DimDate[EndDate]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;AADPMAU Increase =&lt;BR /&gt;&amp;nbsp; &amp;nbsp;var at_end = AADPTable[AADPMAU_End]&lt;BR /&gt;&amp;nbsp; &amp;nbsp;var at_start = AADPTable[AADPMAU_Start]&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return at_end - at_start&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 18:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581136#M74059</guid>
      <dc:creator>charlie7491</dc:creator>
      <dc:date>2022-06-15T18:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581249#M74067</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;You can try the following. Assuming your date slicer is from date table.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;startdate = &lt;/SPAN&gt;&lt;SPAN&gt;FIRSTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Enddate = &lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Days Diff = &lt;/SPAN&gt;&lt;SPAN&gt;INT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Enddate]&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;[startdate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;You may need to adjust the table names to match, but this is the jist of it. Hope this helps.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:34:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581249#M74067</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-06-15T19:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581336#M74071</link>
      <description>&lt;P&gt;I need the&amp;nbsp;&lt;SPAN&gt;AADPMAU &lt;STRONG&gt;Increase&lt;/STRONG&gt; in the values associated with the date changes (and not the difference in dates)&lt;BR /&gt;&lt;BR /&gt;Do you have any suggestion how I can use your approach to calculate the difference?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:44:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581336#M74071</guid>
      <dc:creator>charlie7491</dc:creator>
      <dc:date>2022-06-15T20:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581359#M74073</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I can check it out but ask for some data , like you are working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if it's excel with made up info it's fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:59:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581359#M74073</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-06-15T20:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581364#M74074</link>
      <description>&lt;P&gt;I have the sample PBIX file with the problem scenario but I see no way to send that file to you. Do you know how I may be able to send it to you?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 21:07:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581364#M74074</guid>
      <dc:creator>charlie7491</dc:creator>
      <dc:date>2022-06-15T21:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581479#M74077</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;If yu use dropbox or google drive you can upload to those site and grab a link and paste it into your message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want you can send to my email&amp;nbsp; &lt;A href="mailto:skelleybill@gmail.com" target="_blank"&gt;skelleybill@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 23:35:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2581479#M74077</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-06-15T23:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2587679#M74473</link>
      <description>&lt;P&gt;Thanks so much. I have found the solution. I will post it here soon, hopefully&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 00:35:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2587679#M74473</guid>
      <dc:creator>charlie7491</dc:creator>
      <dc:date>2022-06-20T00:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the difference between two measure values using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2602381#M75275</link>
      <description>&lt;P&gt;The solution is to use the User Relationships approach.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. You have to put the StartDate and EndDate fields into two separate tables (for example &lt;SPAN&gt;DimDate and DimEndDate, respectively)&lt;/SPAN&gt;.&lt;BR /&gt;&lt;BR /&gt;2. Make both of these tables have a relationship with the main table that have the values you are looking to filter based on the StartDate and EndDate slicers&lt;BR /&gt;In our example, that table and field to be filtered is&amp;nbsp;&lt;SPAN&gt;AADPTable[AADPMAU_Sum]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;3. Since you can only have one active relationship at a time, you make the relationship between the DimDate and AADPTable the active one, with a relationship based on the FactDate field&lt;BR /&gt;AND you make the&amp;nbsp;relationship between the DimEndDate and AADPTable the INACTIVE one, also with a relationship based on the FactDate field&lt;BR /&gt;&lt;BR /&gt;4. Having set things up as described above,&lt;BR /&gt;&lt;BR /&gt;The AADPMAU_Sum value associated with the StartDate slicer would be as follows:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AADPMAU_Start = &lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AADPTable[AADP MAU]&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;The AADPMAU_Sum value associated with the EndDate slicer would be as follows:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AADPMAU_End = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;AADPTable&lt;/SPAN&gt;&lt;SPAN&gt;[AADPMAU_Sum]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimEndDate[EndDate]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AADPTable[FactDate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;This article explains User Relationships&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/using-userelationship-in-dax/" target="_blank"&gt;Using USERELATIONSHIP in DAX - SQLBI&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 23:51:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-get-the-difference-between-two-measure-values-using/m-p/2602381#M75275</guid>
      <dc:creator>charlie7491</dc:creator>
      <dc:date>2022-06-26T23:51:06Z</dc:date>
    </item>
  </channel>
</rss>

