<?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: Calculate difference between two month in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593826#M281908</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like you can actually use something much simpler like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NewColMonthDiff=
1+ DATEDIFF(DATEVALUE(Table1[StartMonth]), DATEVALUE(Table1[EndMonth]),MONTH)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jan 2019 14:13:29 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2019-01-02T14:13:29Z</dc:date>
    <item>
      <title>Calculate difference between two month</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593674#M281834</link>
      <description>&lt;P&gt;I have&amp;nbsp; following Columns with in a table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;StartMonth&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; EndMonth&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Jan-2017&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mar-2017&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Nov-2017&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mar-2018&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want difference between Startmonth&amp;nbsp; and endmonth, How can i get following Column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OutPut&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 10:13:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593674#M281834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-02T10:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between two month</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593691#M281846</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&lt;/P&gt;&lt;P&gt;It would be much easier if you had the dates in another format. How about a new column like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NewColMonthDiff=
VAR _StartMonthNum=SWITCH( LEFT(Table1[StartMonth],3),
                                 "Jan", 1,
                                 "Feb",2,
                                  ...
                                 "Dec",12)
VAR _EndMonthNum=SWITCH( LEFT(Table1[EndMonth],3),
                                 "Jan", 1,
                                 "Feb",2,
                                  ...
                                 "Dec",12)
VAR _StartYear=RIGHT(Table1[StartMonth],4)
VAR _EndYear  =RIGHT(Table1[EndMonth],4)
RETURN
1+ (_Endyear - _StartYear)*12 + _EndMonthNum - _StartMonthNum&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where you would have to complete the two SWITCH statements with all the months and their numbers (where I've placed the '...')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 10:57:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593691#M281846</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2019-01-02T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between two month</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593826#M281908</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like you can actually use something much simpler like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NewColMonthDiff=
1+ DATEDIFF(DATEVALUE(Table1[StartMonth]), DATEVALUE(Table1[EndMonth]),MONTH)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2019 14:13:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculate-difference-between-two-month/m-p/593826#M281908</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2019-01-02T14:13:29Z</dc:date>
    </item>
  </channel>
</rss>

