<?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 Missing Data in visual Table - Week over Week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1658473#M33778</link>
    <description>&lt;P&gt;The issue is that I am trying to get Week over Week % AND the ability to use Page Filters to affect the totals.&amp;nbsp; First off, just getting the correct sales from last week is giving me problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using these DAX codes, I am missing the "lastWeekRetailSales" for 01/11/2021, which is sales from 01/04/2021 and they do exist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales = CALCULATE( SUM('Query_Data'[Retail_Sales]), DATEADD('Query_Data'[Start_Date],-7,DAY) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales = 
    CALCULATE (
        SUM ( 'Query_Data'[Retail_Sales] ), 
        FILTER (
            ALLSELECTED('Query_Data'),
            'Query_Data'[Start_Date]
                = MAX('Query_Data'[Start_Date]) - 7
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This DAX code provides me with all the Sales from Last Week, but it NOT affected by the Page Filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales2 =  
    CALCULATE (
        SUM ( 'Query_Data'[Retail_Sales] ), 
        FILTER (
            ALL('Query_Data'),
            'Query_Data'[Start_Date]
                = SELECTEDVALUE('Query_Data'[Start_Date]) - 7
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing?&amp;nbsp; TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 18:07:15 GMT</pubDate>
    <dc:creator>Darrell</dc:creator>
    <dc:date>2021-02-10T18:07:15Z</dc:date>
    <item>
      <title>Missing Data in visual Table - Week over Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1658473#M33778</link>
      <description>&lt;P&gt;The issue is that I am trying to get Week over Week % AND the ability to use Page Filters to affect the totals.&amp;nbsp; First off, just getting the correct sales from last week is giving me problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using these DAX codes, I am missing the "lastWeekRetailSales" for 01/11/2021, which is sales from 01/04/2021 and they do exist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales = CALCULATE( SUM('Query_Data'[Retail_Sales]), DATEADD('Query_Data'[Start_Date],-7,DAY) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales = 
    CALCULATE (
        SUM ( 'Query_Data'[Retail_Sales] ), 
        FILTER (
            ALLSELECTED('Query_Data'),
            'Query_Data'[Start_Date]
                = MAX('Query_Data'[Start_Date]) - 7
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This DAX code provides me with all the Sales from Last Week, but it NOT affected by the Page Filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;lastWeekRetailSales2 =  
    CALCULATE (
        SUM ( 'Query_Data'[Retail_Sales] ), 
        FILTER (
            ALL('Query_Data'),
            'Query_Data'[Start_Date]
                = SELECTEDVALUE('Query_Data'[Start_Date]) - 7
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing?&amp;nbsp; TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 18:07:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1658473#M33778</guid>
      <dc:creator>Darrell</dc:creator>
      <dc:date>2021-02-10T18:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data in visual Table - Week over Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1658612#M33782</link>
      <description>&lt;P&gt;ALLSELECTED by definition will not allow you to access periods that are filtered. You need to use ALL. Also, you don't seem to have a calendar table. You should always use a calendar table for time intelligence&amp;nbsp;&lt;A href="https://exceleratorbi.com.au/power-bi-calendar-tables/" target="_blank"&gt;https://exceleratorbi.com.au/power-bi-calendar-tables/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when you use ALL(calendar[date]), it should work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 19:38:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1658612#M33782</guid>
      <dc:creator>MattAllington</dc:creator>
      <dc:date>2021-02-10T19:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data in visual Table - Week over Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1661514#M33880</link>
      <description>&lt;P&gt;After building your Calendar, I'm in business.&amp;nbsp; Thanks Matt!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 21:22:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Missing-Data-in-visual-Table-Week-over-Week/m-p/1661514#M33880</guid>
      <dc:creator>Darrell</dc:creator>
      <dc:date>2021-02-11T21:22:52Z</dc:date>
    </item>
  </channel>
</rss>

