<?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: %Var between previous date in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/277465#M123786</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the following conditions are met&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You have a calendar table&lt;/LI&gt;&lt;LI&gt;There is a relationship from the Date column of your data table to the date column of your calendar table&lt;/LI&gt;&lt;LI&gt;You extract year and month in the calendar table&lt;/LI&gt;&lt;LI&gt;You drag Year and Month from the calendar table into the visual&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then, this measure will work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;=SUM(Data[Value])/CALCULATE(Data[Value]),PREVIOUSMONTH(Calendar[Date]))&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 03:20:39 GMT</pubDate>
    <dc:creator>Ashish_Mathur</dc:creator>
    <dc:date>2017-10-13T03:20:39Z</dc:date>
    <item>
      <title>%Var between previous date</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/276483#M123289</link>
      <description>&lt;P&gt;Hey, everyone, I've been trying to calculate this, but I'm really stuck. Here is the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want&amp;nbsp;to show in % the difference between months of 2016 and 2017. For example :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;January 2016: 10&lt;/P&gt;&lt;P&gt;January 2017: 11&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;% diff: +10%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance :D&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 23:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/276483#M123289</guid>
      <dc:creator>nzboan</dc:creator>
      <dc:date>2017-10-11T23:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: %Var between previous date</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/277421#M123766</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="44189" data-lia-user-login="nzboan" class="lia-mention lia-mention-user"&gt;nzboan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use below formula to calculate the diff between current year month total and previous year month total.&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;PRE&gt;Diff = 
VAR CYM =
    CALCULATE (
        SUM ( Records[Amount] ),
        FILTER (
            ALLSELECTED ( Records ),
            YEAR ( [Date] ) = YEAR ( MAX ( [Date] ) )
                &amp;amp;&amp;amp; MONTH ( [Date] ) = MONTH ( MAX ( [Date] ) )
        )
    )
VAR PYM =
    CALCULATE (
        SUM ( Records[Amount] ),
        FILTER (
            ALLSELECTED ( Records ),
            YEAR ( [Date] )
                = YEAR ( MAX ( [Date] ) ) - 1
                &amp;amp;&amp;amp; MONTH ( [Date] ) = MONTH ( MAX ( [Date] ) )
        )
    )
RETURN
    DIVIDE ( CYM - PYM, PYM, 0 )
&lt;/PRE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 02:18:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/277421#M123766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T02:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: %Var between previous date</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/277465#M123786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the following conditions are met&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You have a calendar table&lt;/LI&gt;&lt;LI&gt;There is a relationship from the Date column of your data table to the date column of your calendar table&lt;/LI&gt;&lt;LI&gt;You extract year and month in the calendar table&lt;/LI&gt;&lt;LI&gt;You drag Year and Month from the calendar table into the visual&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then, this measure will work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;=SUM(Data[Value])/CALCULATE(Data[Value]),PREVIOUSMONTH(Calendar[Date]))&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 03:20:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Var-between-previous-date/m-p/277465#M123786</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2017-10-13T03:20:39Z</dc:date>
    </item>
  </channel>
</rss>

