<?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: ALLEXCEPT but keep a set filter as well in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922484#M95877</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="475839" data-lia-user-login="lucazanzi" class="lia-mention lia-mention-user"&gt;lucazanzi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes you are right. You csn use&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;CALCULATE ( SUM ( Data[Stock] ), ALLEXCEPT ( Date, Data[City] ) )&lt;/P&gt;
&lt;P&gt;Alternatively, you can replace ALLEXCEPT with REMOVEFILTERS ( ), VALUES ( Date[City] )&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 18:41:26 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-11-22T18:41:26Z</dc:date>
    <item>
      <title>ALLEXCEPT but keep a set filter as well</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922360#M95863</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;This has probably been asked before with a different phrasing, so thank you and apologies in advance!&lt;BR /&gt;&lt;BR /&gt;Let's say my data looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Store&lt;/TD&gt;&lt;TD&gt;City&lt;/TD&gt;&lt;TD&gt;Stock&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;High Street&lt;/TD&gt;&lt;TD&gt;London&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Low Street&lt;/TD&gt;&lt;TD&gt;Vancouver&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Main Street&lt;/TD&gt;&lt;TD&gt;Boston&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Jubilee Street&lt;/TD&gt;&lt;TD&gt;Toronto&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Fun Street&lt;/TD&gt;&lt;TD&gt;Rome&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Low Street&lt;/TD&gt;&lt;TD&gt;Vancouver&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;High Street&lt;/TD&gt;&lt;TD&gt;London&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my report shows the above data in various visuals (ex: Item count by City, number of stores by City, Distinct products by store, total stock by store/city, etc...).&lt;BR /&gt;&lt;BR /&gt;I would like to create a Measure that:&lt;BR /&gt;1) SUMS the Stock&lt;BR /&gt;2) Item == A&lt;BR /&gt;3) Filters based on City if selected (ie: if you click on a City in a visual, the Measure is affected)&lt;BR /&gt;4) Does not filter based on anything else (ie: if you click on a Store in a visual, the Measure is not affected).&lt;BR /&gt;&lt;BR /&gt;I suspect there's an ALLEXCEPT involved, but I have not been able to get it to work. Any hints?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 17:32:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922360#M95863</guid>
      <dc:creator>lucazanzi</dc:creator>
      <dc:date>2022-11-22T17:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALLEXCEPT but keep a set filter as well</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922484#M95877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="475839" data-lia-user-login="lucazanzi" class="lia-mention lia-mention-user"&gt;lucazanzi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes you are right. You csn use&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;CALCULATE ( SUM ( Data[Stock] ), ALLEXCEPT ( Date, Data[City] ) )&lt;/P&gt;
&lt;P&gt;Alternatively, you can replace ALLEXCEPT with REMOVEFILTERS ( ), VALUES ( Date[City] )&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 18:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922484#M95877</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-22T18:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALLEXCEPT but keep a set filter as well</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922728#M95894</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;you may also try&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE (&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUM ( Data[Stock] ),&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ALL ( Data),&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; VALUES(Data[City])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Nov 2022 21:51:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2922728#M95894</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-11-22T21:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: ALLEXCEPT but keep a set filter as well</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2923459#M95928</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="475839" data-lia-user-login="lucazanzi" class="lia-mention lia-mention-user"&gt;lucazanzi&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this method:&lt;/P&gt;
&lt;P&gt;New a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total =
CALCULATE (
    SUM ( 'Table'[Stock] ),
    ALLEXCEPT ( 'Table', 'Table'[City] ),
    FILTER ( 'Table', 'Table'[Item] = "A" )
)
&lt;/LI-CODE&gt;
&lt;P&gt;And the result is:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;Hope these help you.&lt;/P&gt;
&lt;P&gt;Here is my PBIX file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Yinliw&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 06:24:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLEXCEPT-but-keep-a-set-filter-as-well/m-p/2923459#M95928</guid>
      <dc:creator>v-yinliw-msft</dc:creator>
      <dc:date>2022-11-23T06:24:13Z</dc:date>
    </item>
  </channel>
</rss>

