<?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: Measure for counting ignoring context filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2244197#M53804</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I notice the Order No and Store No are not in the same table in your formula, is there Order No column in the Store table? You should use the same table in the formula, it will work fine.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dilivered from stores# = CALCULATE(DISTINCTCOUNT('Sotre'[Store No]),ALLEXCEPT('Sotre','Sotre'[Order No]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Dec 2021 09:12:57 GMT</pubDate>
    <dc:creator>v-yanjiang-msft</dc:creator>
    <dc:date>2021-12-17T09:12:57Z</dc:date>
    <item>
      <title>Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238167#M53523</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to (distinctly) count how many stores have participated in the delivery of an order. I want the measure to ignore the specific filtercontext for the calculations only and not for the visual itself. The model is a Direct Model on an Analysis Service using a Star Scheme. An example of the data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above picture i want it to write 3 on every row whilst only showing the 3 stores in question. Using AllExcept, ALLSELECTED etc. either does the same as the picture or counts every single "Store No." in the dataset. What i want is to tag every "Order No." with the number of unique "Store No.".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SQL i would do it like in the picture below, but i do not know how in DAX.&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;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:15:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238167#M53523</guid>
      <dc:creator>JacobCoops</dc:creator>
      <dc:date>2021-12-14T14:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238206#M53525</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp; the equivalent dax is following&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;LI-CODE lang="markup"&gt;Measure = CALCULATE(COUNT('Table'[storeNumber]),ALLEXCEPT('Table','Table'[orderNumber]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:29:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238206#M53525</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-14T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238277#M53529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That return the following (there can be multiple rows per "Order No." and "Store No." combination which i eliminate using the group by in the SQL)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:48:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238277#M53529</guid>
      <dc:creator>JacobCoops</dc:creator>
      <dc:date>2021-12-14T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238299#M53530</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp; can you try this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(DISTINCTCOUNT('Table'[storeNumber]),ALLEXCEPT('Table','Table'[orderNumber]))&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;</description>
      <pubDate>Tue, 14 Dec 2021 14:53:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238299#M53530</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-14T14:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238350#M53532</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is where it gets strange. I would expect your suggestion to work, but i returns the following. Do you think my model i messed up?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 15:12:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238350#M53532</guid>
      <dc:creator>JacobCoops</dc:creator>
      <dc:date>2021-12-14T15:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238359#M53533</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp; can you please provide some sample data please?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 15:15:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238359#M53533</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-14T15:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238754#M53548</link>
      <description>&lt;LI-CODE lang="markup"&gt;SELECT [OrderNr] ,
       [LagerNr] ,
       COUNT([LagerNr]) OVER (PARTITION BY [LagerNr]) [#DIST]
FROM XXX
WHERE [OrderNr] = '12345'
GROUP BY [OrderNr] , [LagerNr]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Dec 2021 18:04:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2238754#M53548</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2021-12-14T18:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2244197#M53804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I notice the Order No and Store No are not in the same table in your formula, is there Order No column in the Store table? You should use the same table in the formula, it will work fine.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dilivered from stores# = CALCULATE(DISTINCTCOUNT('Sotre'[Store No]),ALLEXCEPT('Sotre','Sotre'[Order No]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 09:12:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2244197#M53804</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2021-12-17T09:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2247038#M53969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct, they are not in the same table. They are connected via. the fact where i join them on their respective keys.&lt;BR /&gt;&lt;BR /&gt;I have tried to distinctcount on the keys in the fact table, but that is not yielding the correct results either.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2247038#M53969</guid>
      <dc:creator>JacobCoops</dc:creator>
      <dc:date>2021-12-20T08:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2247073#M53971</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't upload files to this thread. Do you have any suggestions to how i can send it?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:22:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2247073#M53971</guid>
      <dc:creator>JacobCoops</dc:creator>
      <dc:date>2021-12-20T08:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2248091#M54004</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp; can you please upload a pbix in g/1 drive or any other file hosting service and share the link here?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 16:42:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2248091#M54004</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-20T16:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Measure for counting ignoring context filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2261888#M54718</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223277" data-lia-user-login="JacobCoops" class="lia-mention lia-mention-user"&gt;JacobCoops&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, Order No and Store No are in different tables, I create a sample, they have relationship by the Key column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here's my solution, create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Store'[Store No] ),
    FILTER ( ALL ( 'Order' ), 'Order'[Order No] = MAX ( 'Order'[Order No] ) ),
    FILTER ( ALL ( 'Store' ), 'Store'[Key] = MAX ( 'Store'[Key] ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Get the expected result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 05:47:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-for-counting-ignoring-context-filters/m-p/2261888#M54718</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2021-12-31T05:47:58Z</dc:date>
    </item>
  </channel>
</rss>

