<?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 Re: Remaining Stores Not Delivered CALCULATE FILTER in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000520#M44409</link>
    <description>&lt;P&gt;This will do it&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280539" data-lia-user-login="Darrell" class="lia-mention lia-mention-user"&gt;Darrell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Measure = 
COUNTX(
    FILTER(
        ADDCOLUMNS(
            SUMMARIZE(
                'deliver_data',
                'deliver_data'[store_num]
            ),
            "@Total",
                CALCULATE(
                    SUM( 'deliver_data'[delivered] )
                )
        ),
        [@Total] = 0
    ),
    'deliver_data'[store_num]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 14:43:25 GMT</pubDate>
    <dc:creator>edhans</dc:creator>
    <dc:date>2021-08-05T14:43:25Z</dc:date>
    <item>
      <title>Remaining Stores Not Delivered CALCULATE FILTER</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000343#M44401</link>
      <description>&lt;P&gt;Thanks for viewing.&amp;nbsp; What I thought would be simple has me stumped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PBI File:&amp;nbsp;&lt;A title="PBI Deliveries" href="https://apps.nssrep.com/pbi/Deliveries.pbix" target="_blank" rel="noopener"&gt;PBI Deliveries File&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple task - find out what stores were NOT delivered depending on the user's Week Ending choice.&amp;nbsp; It seems to work choosing 1 week, but when I choose multiple weeks, using the slicer, the number should decrease and not increase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The delivered column contains a whole number of how many deliveries per week were made (0-3).&amp;nbsp; I need to focus solely on those stores that didn't have a delivery over the weeks - stores that 'delivered' data adds up to 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 Columns of Data&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;The "visual" filter I have in place to show only those stores not delivered:&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;When I choose 1 week, it works fine.&amp;nbsp; The total is 208 in this example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count_not_delivered = 
    CALCULATE(
        COUNTA(deliver_data[store_num]), 
        FILTER('deliver_data', 'deliver_data'[delivered] = 0)
    )&lt;/LI-CODE&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;When I choose all 3 dates, it should only be 13, but instead, it adds up to 643.&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;I understand why - it's counting all stores with a 0 in the 'delivered' column for all 3 weeks individually.&amp;nbsp; I need it to somehow SUM all 3 weeks and filter by that and I'm not finding anything online to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like this should work, but of course, it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count_not_delivered = 
    CALCULATE(
        COUNTA(deliver_data[store_num]), 
        FILTER('deliver_data', SUM('deliver_data'[delivered]) = 0)
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 13:21:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000343#M44401</guid>
      <dc:creator>Darrell</dc:creator>
      <dc:date>2021-08-05T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Stores Not Delivered CALCULATE FILTER</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000520#M44409</link>
      <description>&lt;P&gt;This will do it&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280539" data-lia-user-login="Darrell" class="lia-mention lia-mention-user"&gt;Darrell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Measure = 
COUNTX(
    FILTER(
        ADDCOLUMNS(
            SUMMARIZE(
                'deliver_data',
                'deliver_data'[store_num]
            ),
            "@Total",
                CALCULATE(
                    SUM( 'deliver_data'[delivered] )
                )
        ),
        [@Total] = 0
    ),
    'deliver_data'[store_num]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:43:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000520#M44409</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2021-08-05T14:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Stores Not Delivered CALCULATE FILTER</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000606#M44411</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I'll take some time and work through your solution.&amp;nbsp; I appreciate it!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 15:20:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000606#M44411</guid>
      <dc:creator>Darrell</dc:creator>
      <dc:date>2021-08-05T15:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remaining Stores Not Delivered CALCULATE FILTER</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000627#M44412</link>
      <description>&lt;P&gt;Glad to help&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280539" data-lia-user-login="Darrell" class="lia-mention lia-mention-user"&gt;Darrell&lt;/a&gt;&amp;nbsp;- what ADDCOLUMNS(SUMMARIZE()) is doing is building a mini-table that is grouped the way you were describing the desired results, the it FILTER()'s it, then COUNTX will count the instances. Any questions, let me know.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I used DAX Studio to build the mini-table so I could see what it was. Here is how the table looks with no filtering by a slicer. Once in Power BI and a slicer affects it, it changes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 15:34:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remaining-Stores-Not-Delivered-CALCULATE-FILTER/m-p/2000627#M44412</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2021-08-05T15:34:24Z</dc:date>
    </item>
  </channel>
</rss>

