<?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 Need n, n-1, n-2, n-3, n-4, n-5 months data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-n-n-1-n-2-n-3-n-4-n-5-months-data/m-p/3228146#M118313</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am struggling to achive the below requirment.&lt;/P&gt;&lt;P&gt;requirment is:&lt;/P&gt;&lt;P&gt;we have two dates 1. Forecast dates 2. forecast months.&lt;/P&gt;&lt;P&gt;each forecast dates have 12 forecast months. currently i have only 5 forecast dates. (01-Aug-22, 10-Sept-22, 20-Oct-22, 25-Nov-22, 30-Dec-22)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;if user select the 23-Feb forcast month then that Feb month is current month this is (n)&lt;/P&gt;&lt;P&gt;then 23-Jan Month Feb becomes (n-1)&lt;/P&gt;&lt;P&gt;then 22-Dec&amp;nbsp;month Feb becomes (n-2)&lt;/P&gt;&lt;P&gt;then 22-Nov Month Feb becomes (n-3)&lt;/P&gt;&lt;P&gt;then 22-Oct Month Feb becomes (n-4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like if user selec 22-Dec then it becomes n then rest all n-1, n-2, n-3, n-4.&lt;/P&gt;&lt;P&gt;so it should be dynamic.&lt;/P&gt;&lt;P&gt;my measure is SUM(Quantity)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 05:31:18 GMT</pubDate>
    <dc:creator>nprasanthk</dc:creator>
    <dc:date>2023-05-10T05:31:18Z</dc:date>
    <item>
      <title>Need n, n-1, n-2, n-3, n-4, n-5 months data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-n-n-1-n-2-n-3-n-4-n-5-months-data/m-p/3228146#M118313</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am struggling to achive the below requirment.&lt;/P&gt;&lt;P&gt;requirment is:&lt;/P&gt;&lt;P&gt;we have two dates 1. Forecast dates 2. forecast months.&lt;/P&gt;&lt;P&gt;each forecast dates have 12 forecast months. currently i have only 5 forecast dates. (01-Aug-22, 10-Sept-22, 20-Oct-22, 25-Nov-22, 30-Dec-22)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;if user select the 23-Feb forcast month then that Feb month is current month this is (n)&lt;/P&gt;&lt;P&gt;then 23-Jan Month Feb becomes (n-1)&lt;/P&gt;&lt;P&gt;then 22-Dec&amp;nbsp;month Feb becomes (n-2)&lt;/P&gt;&lt;P&gt;then 22-Nov Month Feb becomes (n-3)&lt;/P&gt;&lt;P&gt;then 22-Oct Month Feb becomes (n-4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like if user selec 22-Dec then it becomes n then rest all n-1, n-2, n-3, n-4.&lt;/P&gt;&lt;P&gt;so it should be dynamic.&lt;/P&gt;&lt;P&gt;my measure is SUM(Quantity)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 05:31:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-n-n-1-n-2-n-3-n-4-n-5-months-data/m-p/3228146#M118313</guid>
      <dc:creator>nprasanthk</dc:creator>
      <dc:date>2023-05-10T05:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need n, n-1, n-2, n-3, n-4, n-5 months data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-n-n-1-n-2-n-3-n-4-n-5-months-data/m-p/3228159#M118315</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="412388" data-lia-user-login="nprasanthk" class="lia-mention lia-mention-user"&gt;nprasanthk&lt;/a&gt; , with help from date table( if needed create date from month year) joined with date of your table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))&lt;BR /&gt;last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;last 2nd MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-2,MONTH)))&lt;BR /&gt;last 2nd month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-1,MONTH)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;last 3rd MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-3,MONTH)))&lt;BR /&gt;last 3rd month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-2,MONTH)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Time Intelligence, Part of learn Power BI &lt;A href="https://youtu.be/cN8AO3_vmlY?t=27510" target="_blank"&gt;https://youtu.be/cN8AO3_vmlY?t=27510&lt;/A&gt;&lt;BR /&gt;Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period, &lt;BR /&gt;Custom Period till date: &lt;A href="https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s" target="_blank"&gt;https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need a trend (of 6 months when 1 is selected) then you consider the independent table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need of an Independent Table in Power BI - Exclude: &lt;A href="https://youtu.be/lOEW-YUrAbE" target="_blank"&gt;https://youtu.be/lOEW-YUrAbE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 05:42:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-n-n-1-n-2-n-3-n-4-n-5-months-data/m-p/3228159#M118315</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-05-10T05:42:56Z</dc:date>
    </item>
  </channel>
</rss>

