<?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: Last twelve months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901618#M94534</link>
    <description>&lt;P&gt;Thanks Ankit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your solution, but I am getting the error message "A single value for column 'Cost' in table 'Sheet1' cannot be determined". See below. What is wrong here? Your help is much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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;</description>
    <pubDate>Sat, 12 Nov 2022 19:50:03 GMT</pubDate>
    <dc:creator>peterlyngvig</dc:creator>
    <dc:date>2022-11-12T19:50:03Z</dc:date>
    <item>
      <title>Last twelve months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901457#M94518</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table below, I have presented some monthly cost data - each data represents the sum of the various costs items for each month. The input data is a spreadsheet with credit card transactions with a date column and cost column representing the date and cost for each transaction. I would like to make another version of this table, which shows&amp;nbsp;&lt;U&gt;last twelve months data&lt;/U&gt; instead of the&amp;nbsp;&lt;U&gt;monthly data&lt;/U&gt;. As an example, the column October, should show the sum of costs for the twelve months starting November the previous year and ending October this year. The column September should show the sum of the costs for the period starting October previous year and ending September this year. And so on. Can anyone help with this please? Thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&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;</description>
      <pubDate>Sat, 12 Nov 2022 15:19:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901457#M94518</guid>
      <dc:creator>peterlyngvig</dc:creator>
      <dc:date>2022-11-12T15:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Last twelve months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901531#M94524</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a date table it is easy.&lt;/P&gt;
&lt;P&gt;12 month =&lt;BR /&gt;var datemax=selectedvalue(Date[Month])&lt;/P&gt;
&lt;P&gt;return&lt;/P&gt;
&lt;P&gt;calculate(sum(cost),removefilters(date[Month)),&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;datemax&lt;/SPAN&gt;&lt;SPAN&gt;,-&lt;/SPAN&gt;&lt;SPAN&gt;11&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Month&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 16:55:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901531#M94524</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-12T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Last twelve months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901534#M94525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470980" data-lia-user-login="peterlyngvig" class="lia-mention lia-mention-user"&gt;peterlyngvig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try something like this.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Last 12 Months=&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Total Sales],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DATESINPERIOD (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Date'[Date],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MAX ( 'Date'[Date] ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-12,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MONTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 16:58:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901534#M94525</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2022-11-12T16:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Last twelve months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901618#M94534</link>
      <description>&lt;P&gt;Thanks Ankit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your solution, but I am getting the error message "A single value for column 'Cost' in table 'Sheet1' cannot be determined". See below. What is wrong here? Your help is much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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;</description>
      <pubDate>Sat, 12 Nov 2022 19:50:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-twelve-months/m-p/2901618#M94534</guid>
      <dc:creator>peterlyngvig</dc:creator>
      <dc:date>2022-11-12T19:50:03Z</dc:date>
    </item>
  </channel>
</rss>

