<?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 Sales and Prior Year Sales In A Matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3211824#M117154</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this has been answered before but I want to show on a Matrix the following columns:&amp;nbsp; Year, Revenue, Last Year Revenue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data set has a reference date and a revenue column.&amp;nbsp; I created a measure called 'Total Revenue (msr)'.&amp;nbsp; Then I created a measure like the following:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Revenue LY (msr) = &lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Total Revenue (msr)]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Revenue By Year'&lt;/SPAN&gt;&lt;SPAN&gt;[ReferenceDate]&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The only way I can show last year revenue on the matrix is to actually show the reference date.&amp;nbsp; For this visual, I only wanted to show the Year portion of the transaction date.&amp;nbsp; Thus, rolled up to year.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 28 Apr 2023 19:53:46 GMT</pubDate>
    <dc:creator>danielpaduck</dc:creator>
    <dc:date>2023-04-28T19:53:46Z</dc:date>
    <item>
      <title>Sales and Prior Year Sales In A Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3211824#M117154</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this has been answered before but I want to show on a Matrix the following columns:&amp;nbsp; Year, Revenue, Last Year Revenue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data set has a reference date and a revenue column.&amp;nbsp; I created a measure called 'Total Revenue (msr)'.&amp;nbsp; Then I created a measure like the following:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Revenue LY (msr) = &lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Total Revenue (msr)]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Revenue By Year'&lt;/SPAN&gt;&lt;SPAN&gt;[ReferenceDate]&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The only way I can show last year revenue on the matrix is to actually show the reference date.&amp;nbsp; For this visual, I only wanted to show the Year portion of the transaction date.&amp;nbsp; Thus, rolled up to year.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Apr 2023 19:53:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3211824#M117154</guid>
      <dc:creator>danielpaduck</dc:creator>
      <dc:date>2023-04-28T19:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sales and Prior Year Sales In A Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3211892#M117161</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292032" data-lia-user-login="danielpaduck" class="lia-mention lia-mention-user"&gt;danielpaduck&lt;/a&gt; , first of all, create a date table, having year, month , qtr etc. Join it with your date and create measure like. User period from date table in visual, slicer and measures &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Total Revenue LY (msr) = Calculate([Total Revenue (msr)], SAMEPERIODLASTYEAR('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date table code example&lt;/P&gt;
&lt;P&gt;Date= Addcolumns(calendar(date(2020,01,01), date(2021,12,31) ), "Month no" , month([date]) &lt;BR /&gt;, "Year", year([date])&lt;BR /&gt;, "Month Year", format([date],"mmm-yyyy") &lt;BR /&gt;, "Month year sort", year([date])*100 + month([date])&lt;BR /&gt;, "Qtr Year", format([date],"yyyy-\QQ") &lt;BR /&gt;, "Qtr", quarter([date]) &lt;BR /&gt;, "Month",FORMAT([Date],"mmmm")&lt;BR /&gt;, "Month sort", month([DAte])&lt;BR /&gt;, "FY Year", if( Month(_max) &amp;lt;7 , year(_max)-1 ,year(_max))&lt;BR /&gt;, "Is Today" ,if([Date]=TODAY(),"Today",[Date]&amp;amp;"") &lt;BR /&gt;,"Day of Year" , datediff(date(year([DAte]),1,1), [Date], day)+1 &lt;BR /&gt;, "Month Type", Switch( True(),&lt;BR /&gt;eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,&lt;BR /&gt;eomonth([Date],0)= eomonth(Today(),0),"This Month" ,&lt;BR /&gt;Format([Date],"MMM-YYYY") )&lt;BR /&gt;,"Year Type" , Switch( True(),&lt;BR /&gt;year([Date])= year(Today()),"This Year" ,&lt;BR /&gt;year([Date])= year(Today())-1,"Last Year" ,&lt;BR /&gt;Format([Date],"YYYY")&lt;BR /&gt;) &lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :&lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4" target="_blank"&gt;https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4&lt;/A&gt;&lt;BR /&gt;&lt;FONT size="2"&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;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 20:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3211892#M117161</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-04-28T20:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sales and Prior Year Sales In A Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212024#M117176</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="292032" data-lia-user-login="danielpaduck" class="lia-mention lia-mention-user"&gt;danielpaduck&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:Total Revenue LY (msr) = Calculate([Total Revenue (msr)], EDTAE('Revenue By Year'[ReferenceDate], -12))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. in the long run, you shall be working with Time Intelligence functions for such cases.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 23:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212024#M117176</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-28T23:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sales and Prior Year Sales In A Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212282#M117190</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; My Power BI is not recognizing the EDTAE function that you referenced.&amp;nbsp; &amp;nbsp;Is that in a newer version of Power BI?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 13:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212282#M117190</guid>
      <dc:creator>danielpaduck</dc:creator>
      <dc:date>2023-04-29T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sales and Prior Year Sales In A Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212283#M117191</link>
      <description>&lt;P&gt;Hi - yes, this worked perfectly!&amp;nbsp; Thanks!&amp;nbsp; Do you have any books you can recommend for DAX?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 13:28:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-and-Prior-Year-Sales-In-A-Matrix/m-p/3212283#M117191</guid>
      <dc:creator>danielpaduck</dc:creator>
      <dc:date>2023-04-29T13:28:37Z</dc:date>
    </item>
  </channel>
</rss>

