<?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 Previous Month Last Year Sales - Card Visualisation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1214437#M19592</link>
    <description>Hi, I am trying to create 3 card visuals showing Previous Month Sales, Previous Month Last Year Sales and Year over Year % (Previous Month vs Previous Month Last Year %). I will then attempt the same calculations for Before Previous Month to. My Previous Month Sales calculation works when i select the drop down year, but i cannot get the Previous Month Last Year Right. Current Dax: Previous Month Sales = var current_month= MONTH(TODAY()) return CALCULATE(sum('Fact Basket'[BasketTotal]),FILTER('Fact Basket',MONTH('Fact Basket'[TransactionDateTime])=current_month -1)) Is anyone able to assist? Thank You</description>
    <pubDate>Fri, 10 Jul 2020 11:03:44 GMT</pubDate>
    <dc:creator>ClaireBear</dc:creator>
    <dc:date>2020-07-10T11:03:44Z</dc:date>
    <item>
      <title>Previous Month Last Year Sales - Card Visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1214437#M19592</link>
      <description>Hi, I am trying to create 3 card visuals showing Previous Month Sales, Previous Month Last Year Sales and Year over Year % (Previous Month vs Previous Month Last Year %). I will then attempt the same calculations for Before Previous Month to. My Previous Month Sales calculation works when i select the drop down year, but i cannot get the Previous Month Last Year Right. Current Dax: Previous Month Sales = var current_month= MONTH(TODAY()) return CALCULATE(sum('Fact Basket'[BasketTotal]),FILTER('Fact Basket',MONTH('Fact Basket'[TransactionDateTime])=current_month -1)) Is anyone able to assist? Thank You</description>
      <pubDate>Fri, 10 Jul 2020 11:03:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1214437#M19592</guid>
      <dc:creator>ClaireBear</dc:creator>
      <dc:date>2020-07-10T11:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Last Year Sales - Card Visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1214934#M19599</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Previous Month =
CALCULATE ( [Total Sales], PREVIOUSMONTH ( Dates[Date] ) )&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;Previous Month LY =
CALCULATE (
    [Total Sales],
    PREVIOUSMONTH ( SAMEPERIODLASTYEAR ( Dates[Date] ) )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;YOY % =
DIVIDE ( [Previous Month] - [Previous Month LY], [Previous Month LY] )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 14:04:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1214934#M19599</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-10T14:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Last Year Sales - Card Visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1215160#M19612</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="122698" data-lia-user-login="ClaireBear" class="lia-mention lia-mention-user"&gt;ClaireBear&lt;/a&gt; , Try these with a date calendar. do You need 13 months behind measure , then use 13 in place of 12 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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 MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
last year MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
&lt;/LI-CODE&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>Fri, 10 Jul 2020 15:43:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1215160#M19612</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-10T15:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Last Year Sales - Card Visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1228107#M19990</link>
      <description>&lt;P&gt;This worked great! I used the following measure for Quarter:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Previous Qtr LY Sales = CALCULATE([total sales],DATESQTD(ENDOFQUARTER(dateadd('Dimension Time'[Date],-5,QUARTER))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank You!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jul 2020 12:25:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/1228107#M19990</guid>
      <dc:creator>ClaireBear</dc:creator>
      <dc:date>2020-07-16T12:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Last Year Sales - Card Visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/2199893#M51629</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Previous Qtr LY Sales = CALCULATE([total sales],DATESQTD(ENDOFQUARTER(dateadd('Dimension Time'[Date],-5,QUARTER))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;can this calculation works in CARD visual?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it works in table matrix but not as card visual. pls help&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 21 Nov 2021 09:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Last-Year-Sales-Card-Visualisation/m-p/2199893#M51629</guid>
      <dc:creator>abc_777</dc:creator>
      <dc:date>2021-11-21T09:16:51Z</dc:date>
    </item>
  </channel>
</rss>

