<?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 between measurements in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902236#M8280</link>
    <description>&lt;P&gt;final =&lt;/P&gt;&lt;P&gt;var sub=[price1]-[price2]&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;[Count of booking]*Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin Wattamwar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If it resolves your problem mark it as solution and give kudos.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 14:20:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-16T14:20:31Z</dc:date>
    <item>
      <title>Subtracting between measurements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902228#M8279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling with this case for quite some time now, hopefully this community got some tricks up their sleves...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i wanna do is calculate the savings by subtracting the price year 2 from the price year 1 and multiplying it with the current years bookings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another thing that might be good to know is that the prices from year 1 and 2 are measures in the same table.&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;&lt;P&gt;Thanks for any support!&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:06:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902228#M8279</guid>
      <dc:creator>dannyd</dc:creator>
      <dc:date>2020-01-16T14:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting between measurements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902236#M8280</link>
      <description>&lt;P&gt;final =&lt;/P&gt;&lt;P&gt;var sub=[price1]-[price2]&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;[Count of booking]*Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin Wattamwar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If it resolves your problem mark it as solution and give kudos.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:20:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902236#M8280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-16T14:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting between measurements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902285#M8283</link>
      <description>&lt;P&gt;Thanks for the quick answer Pravin!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i was not to clear about was that the measures price1 and price2 are the same. Is it perhaps possible to add a filter to your code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:44:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/902285#M8283</guid>
      <dc:creator>dannyd</dc:creator>
      <dc:date>2020-01-16T14:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting between measurements</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/904007#M8388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199625" data-lia-user-login="dannyd" class="lia-mention lia-mention-user"&gt;dannyd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
var _year1 = 2018
var _year2 = 2019
RETURN
(CALCULATE([price]; YEAR('Table'[Date])=_year1) - CALCULATE([price]; YEAR('Table'[Date])=_year2)) * CALCULATE(Count('Table'[Booking]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#ababab"&gt;do not hesitate to give a kudo to useful posts and mark solutions as solution&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 15:23:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-between-measurements/m-p/904007#M8388</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-01-18T15:23:21Z</dc:date>
    </item>
  </channel>
</rss>

