<?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: How to find Last Month Value Dynamically in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1357096#M24540</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have attached Sample data &lt;STRONG&gt;&lt;A href="https://drive.google.com/file/d/1WsYfX_pajfQqOw3vLiEx0_bDSU18VJNq/view?usp=sharing" target="_blank" rel="noopener"&gt;Click here&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i need result like this (3 Month ticket closed Details) - i have already created calender table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Unique TicketID Count Monthly basis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Ticket Closed Current Month&lt;/TD&gt;&lt;TD&gt;Ticket Closed Last Month&lt;/TD&gt;&lt;TD&gt;Ticket Closed Last Month -1&amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rajesh R&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2020 06:18:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-09-09T06:18:45Z</dc:date>
    <item>
      <title>How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354361#M24429</link>
      <description>&lt;P&gt;i need last month,&amp;nbsp; &amp;nbsp;Ticket closed Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have tried below DAX but it return all the values i need puticular one month value only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tickets Closed (Current Month -1) =&lt;BR /&gt;VAR _CurrentDate = MAX('Table'[RequestClosedDate])&lt;BR /&gt;VAR _StartMonth = EOMONTH(_CurrentDate,-1)+1&lt;BR /&gt;VAR _EndMonth = EOMONTH(_StartMonth,0)+1&lt;BR /&gt;VAR _Count =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT(Table'[TicketNo]),&lt;BR /&gt;'Table'[RequestClosedDate] &amp;gt;= _StartMonth&lt;BR /&gt;&amp;amp;&amp;amp; 'Table'[RequestClosedDate] &amp;lt;= _CurrentDate&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;/P&gt;&lt;P&gt;_Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is any &lt;SPAN&gt;way to solve this matter? Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rajesh&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 09:38:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354361#M24429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-08T09:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354368#M24430</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , join you close date with date table and use time intelligence &lt;/P&gt;
&lt;P&gt;Examples&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
previous month value =  CALCULATE(sum('table'[total hours value]),previousmonth('Date'[Date]))

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

//Without Time Intelligence 
Month Rank = RANKX(all('Date'),'Date'[Month Start date],,ASC,Dense)	
This Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])))
Last Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])-1))
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer : &lt;BR /&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi" target="_blank"&gt;https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See if my webinar on Time Intelligence can help: &lt;A href="https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184" target="_blank"&gt;https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate your Kudos.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 09:39:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354368#M24430</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-09-08T09:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354533#M24442</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have tried EOMONTH(),&amp;nbsp; and Previousmonth() but it's not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previous Month() its return wrong value&lt;/P&gt;&lt;P&gt;any guss?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 10:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354533#M24442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-08T10:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354551#M24443</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , It should work with Date calendar marked as Date. &lt;/P&gt;
&lt;P&gt;Take my file and check. Attached after signature&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 10:46:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1354551#M24443</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-09-08T10:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355041#M24458</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;- I guess I would think:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Tickets Closed (Current Month -1) =
VAR _CurrentDate = MAX('Table'[RequestClosedDate])
VAR _StartMonthDate = EOMONTH(_CurrentDate,-1)
VAR _StartMonth = DATE(YEAR(_StartMonthDate),MONTH(_StartMonthDate),1)
VAR _EndMonth = EOMONTH(_StartMonth,-1)
VAR _Count =
CALCULATE(
DISTINCTCOUNT(Table'[TicketNo]),
'Table'[RequestClosedDate] &amp;gt;= _StartMonth
&amp;amp;&amp;amp; 'Table'[RequestClosedDate] &amp;lt;= _CurrentDate
)
RETURN

_Count&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Sep 2020 13:26:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355041#M24458</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-09-08T13:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355088#M24460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's return all the value i need last month ticket closed value only,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i have ticktno and Request closed date colum ,&amp;nbsp; i want to distinct count of how many tickets are closed last Month ,&amp;nbsp; (request closed month column is a date field)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any guss?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 13:42:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355088#M24460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-08T13:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355263#M24471</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;- Let's back-up. Sample data, expected output.&lt;/P&gt;
&lt;P&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 14:30:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1355263#M24471</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-09-08T14:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Last Month Value Dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1357096#M24540</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have attached Sample data &lt;STRONG&gt;&lt;A href="https://drive.google.com/file/d/1WsYfX_pajfQqOw3vLiEx0_bDSU18VJNq/view?usp=sharing" target="_blank" rel="noopener"&gt;Click here&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i need result like this (3 Month ticket closed Details) - i have already created calender table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Unique TicketID Count Monthly basis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Ticket Closed Current Month&lt;/TD&gt;&lt;TD&gt;Ticket Closed Last Month&lt;/TD&gt;&lt;TD&gt;Ticket Closed Last Month -1&amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rajesh R&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 06:18:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-Last-Month-Value-Dynamically/m-p/1357096#M24540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-09T06:18:45Z</dc:date>
    </item>
  </channel>
</rss>

