<?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 Getting the Last Month values returns wrong values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-Last-Month-values-returns-wrong-values/m-p/3029878#M103501</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to get a list of the last month values for the Revenue Total column but for some reason the function stops working on the third entry. What could be causing this?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Bernardo Macieira&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 00:14:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-19T00:14:33Z</dc:date>
    <item>
      <title>Getting the Last Month values returns wrong values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-Last-Month-values-returns-wrong-values/m-p/3029878#M103501</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to get a list of the last month values for the Revenue Total column but for some reason the function stops working on the third entry. What could be causing this?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Bernardo Macieira&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 00:14:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-Last-Month-values-returns-wrong-values/m-p/3029878#M103501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-19T00:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the Last Month values returns wrong values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-Last-Month-values-returns-wrong-values/m-p/3029932#M103508</link>
      <description>&lt;P&gt;hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;im sure there is a better efficent way to do this but what i did is&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1) create a month-year column :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Month-Year = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"MM-YYYY"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;2) create a sort column :&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sort = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Date],&lt;/SPAN&gt;&lt;SPAN&gt;"YYYYMM"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;3) create a rank for the dates :&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RANK = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;('Table','Table'[sort],,&lt;/SPAN&gt;&lt;SPAN&gt;ASC&lt;/SPAN&gt;&lt;SPAN&gt;,dENSE)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;4) create a measure:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last Month sales = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(SUM('Table'[Sales]),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;('Table'),'Table'[RANK]= (&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[RANK])-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;BR /&gt;&lt;BR /&gt;i made a very small sample unrelated to your data:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Jan 2023 01:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-Last-Month-values-returns-wrong-values/m-p/3029932#M103508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-19T01:03:01Z</dc:date>
    </item>
  </channel>
</rss>

