<?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 Getting Sales of Previous Period with Multiple filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1802581#M38112</link>
    <description>&lt;P&gt;Hello! Can't seem to get the correct value for &lt;STRONG&gt;sales of previous period&lt;/STRONG&gt; when multiple sliders are involved. Already tried multiple solutions but I can't figure out what's missing. All the data are placed in a single table already to simplify the visualization.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DeptSalesByType Table columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales (Fixed Decimal Number)&lt;/P&gt;&lt;P&gt;Department (Text)&lt;/P&gt;&lt;P&gt;Transaction_date (Whole Number)&lt;/P&gt;&lt;P&gt;Type (Text)&lt;/P&gt;&lt;P&gt;FullDate (converted Date/Time from Transaction_Date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4 Sliders:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Year (2017 | 2018 | 2019 | 2020)&lt;/P&gt;&lt;P&gt;Month (Jan | Feb | Mar | .... Nov | Dec)&lt;/P&gt;&lt;P&gt;Type ( All | Loyalty | Non-Loyalty)&lt;/P&gt;&lt;P&gt;Department (Cosmetics | Kids | Mens | Womens)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Measures:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Previous Period = CALCULATE(SUM(DeptSalesByType[ Sales ]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Previous Period],[End Previous Period]))&amp;nbsp; &lt;STRONG&gt;-- always Blank result&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Previous Year v2 = CALCULATE(SUM(DeptSalesByType[ Sales ]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(ALL(DeptSalesByType[FullDate]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Previous Period],[End Previous Period])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp; &lt;STRONG&gt;--&amp;nbsp; same result as the sales of current Period&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Current Period = CALCULATE(SUM(DeptSalesByType[ Sales ]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Current Period],[End Current Period]))&amp;nbsp;&lt;STRONG&gt; --&amp;nbsp; Working&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 23 Apr 2021 11:11:27 GMT</pubDate>
    <dc:creator>Daplis</dc:creator>
    <dc:date>2021-04-23T11:11:27Z</dc:date>
    <item>
      <title>Getting Sales of Previous Period with Multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1802581#M38112</link>
      <description>&lt;P&gt;Hello! Can't seem to get the correct value for &lt;STRONG&gt;sales of previous period&lt;/STRONG&gt; when multiple sliders are involved. Already tried multiple solutions but I can't figure out what's missing. All the data are placed in a single table already to simplify the visualization.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DeptSalesByType Table columns:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sales (Fixed Decimal Number)&lt;/P&gt;&lt;P&gt;Department (Text)&lt;/P&gt;&lt;P&gt;Transaction_date (Whole Number)&lt;/P&gt;&lt;P&gt;Type (Text)&lt;/P&gt;&lt;P&gt;FullDate (converted Date/Time from Transaction_Date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4 Sliders:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Year (2017 | 2018 | 2019 | 2020)&lt;/P&gt;&lt;P&gt;Month (Jan | Feb | Mar | .... Nov | Dec)&lt;/P&gt;&lt;P&gt;Type ( All | Loyalty | Non-Loyalty)&lt;/P&gt;&lt;P&gt;Department (Cosmetics | Kids | Mens | Womens)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Measures:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Previous Period = CALCULATE(SUM(DeptSalesByType[ Sales ]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Previous Period],[End Previous Period]))&amp;nbsp; &lt;STRONG&gt;-- always Blank result&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Previous Year v2 = CALCULATE(SUM(DeptSalesByType[ Sales ]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(ALL(DeptSalesByType[FullDate]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Previous Period],[End Previous Period])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp; &lt;STRONG&gt;--&amp;nbsp; same result as the sales of current Period&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Current Period = CALCULATE(SUM(DeptSalesByType[ Sales ]),DATESBETWEEN(DeptSalesByType[FullDate],[Start Current Period],[End Current Period]))&amp;nbsp;&lt;STRONG&gt; --&amp;nbsp; Working&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Apr 2021 11:11:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1802581#M38112</guid>
      <dc:creator>Daplis</dc:creator>
      <dc:date>2021-04-23T11:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Sales of Previous Period with Multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1802979#M38113</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297801" data-lia-user-login="Daplis" class="lia-mention lia-mention-user"&gt;Daplis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a question about DAX, not Power Query... Can you please post this on the right forum?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A very quick hint why this does not work can be found at&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/guidance/star-schema" target="_blank"&gt;Understand star schema and the importance for Power BI - Power BI | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/" target="_blank"&gt;Time Intelligence in Power BI Desktop - SQLBI.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 14:52:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1802979#M38113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-23T14:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Sales of Previous Period with Multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1807834#M38180</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297801" data-lia-user-login="Daplis" class="lia-mention lia-mention-user"&gt;Daplis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You only a Full Date column, I don't see how did you get the Start and End period, can you just share sample pbix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paul Zheng _ Community Support Team&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 06:23:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1807834#M38180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-27T06:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Sales of Previous Period with Multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1808652#M38190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here they are:&lt;/P&gt;&lt;P&gt;Start Current Period = FIRSTDATE(DeptSalesByType[FullDate])&lt;BR /&gt;End Current Period = LASTDATE(DeptSalesByType[FullDate])&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Start Previous Period = [End Previous Period]-[Days Current Period]&lt;BR /&gt;End Previous Period = [Start Current Period]-1&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Days Current Period = DATEDIFF([Start Current Period],[End Current Period],day)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 10:32:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1808652#M38190</guid>
      <dc:creator>Daplis</dc:creator>
      <dc:date>2021-04-27T10:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Sales of Previous Period with Multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1816236#M38443</link>
      <description>&lt;P&gt;Actually managed to solve this. Had to create a duplicate table of the FullDate and it worked. Not sure if it's the right way though as I made the date redudant.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 09:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Sales-of-Previous-Period-with-Multiple-filters/m-p/1816236#M38443</guid>
      <dc:creator>Daplis</dc:creator>
      <dc:date>2021-04-30T09:04:00Z</dc:date>
    </item>
  </channel>
</rss>

