<?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 Creating a sameperiodlastyear measure that retains Parent and product line data. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-sameperiodlastyear-measure-that-retains-Parent-and/m-p/3188887#M157048</link>
    <description>&lt;P&gt;I am working on a report to easily show a specific company's sales by product line, comparing this year's sales to last year's using sameperiodlastyear. The measure currently works with Invoice Date and Sales but when the parent or product is added I get an error. It seems like the connection between last year's measure and the parent or product is lost and I am having trouble finding the solutions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with 5 columns and measures.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'ChartMeasures'[Sales ($)]&lt;/LI&gt;&lt;LI&gt;'ChartMeasures'[LY Sales ($)]&lt;/LI&gt;&lt;LI&gt;'CustomerParent'[ParentName]&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;'ReportingCalendar'&lt;/SPAN&gt;&lt;SPAN&gt;[InvoiceDate]&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;'refProductLine'[ProductLine"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Last Year sales Measure:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;LY Sales ($) = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; [Sales ($)],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;('ReportingCalendar'[InvoiceDate]))&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 14 Apr 2023 15:37:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-14T15:37:38Z</dc:date>
    <item>
      <title>Creating a sameperiodlastyear measure that retains Parent and product line data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-sameperiodlastyear-measure-that-retains-Parent-and/m-p/3188887#M157048</link>
      <description>&lt;P&gt;I am working on a report to easily show a specific company's sales by product line, comparing this year's sales to last year's using sameperiodlastyear. The measure currently works with Invoice Date and Sales but when the parent or product is added I get an error. It seems like the connection between last year's measure and the parent or product is lost and I am having trouble finding the solutions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with 5 columns and measures.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'ChartMeasures'[Sales ($)]&lt;/LI&gt;&lt;LI&gt;'ChartMeasures'[LY Sales ($)]&lt;/LI&gt;&lt;LI&gt;'CustomerParent'[ParentName]&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;'ReportingCalendar'&lt;/SPAN&gt;&lt;SPAN&gt;[InvoiceDate]&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;'refProductLine'[ProductLine"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Last Year sales Measure:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;LY Sales ($) = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; [Sales ($)],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;('ReportingCalendar'[InvoiceDate]))&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Apr 2023 15:37:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-sameperiodlastyear-measure-that-retains-Parent-and/m-p/3188887#M157048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T15:37:38Z</dc:date>
    </item>
  </channel>
</rss>

