<?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: Filter a Distinctcount function by another measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202510#M116467</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Distinct count Jan Dec =
IF (
    SELECTEDVALUE ( v_DimCountrySoldTo[CountryEN] ) = "Austria",
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Column] ),
        v_DimDate[MonthNumber] IN { 1, 2, 12 }
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Column] ),
        v_DimDate[MonthNumber] IN { 1, 12 }
    )
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 24 Apr 2023 09:26:07 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-04-24T09:26:07Z</dc:date>
    <item>
      <title>Filter a Distinctcount function by another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202461#M116460</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need a measure that calculated the distinct count of Items, but only for the months January and December. So it should just distinct count the items where the Measure i already wrote is not blank&lt;/P&gt;&lt;P&gt;The measure to sum the quantity of Jan&amp;amp;Dec&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;SumofQuantity_Jan_Dec&lt;/SPAN&gt;&lt;SPAN&gt;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t;SPAN&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[GlobalDeliveredQuantity new]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;v_DimDate&lt;/SPAN&gt;&lt;SPAN&gt;[MonthNumber]&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Help please!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Apr 2023 08:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202461#M116460</guid>
      <dc:creator>Julie_</dc:creator>
      <dc:date>2023-04-24T08:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a Distinctcount function by another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202510#M116467</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Distinct count Jan Dec =
IF (
    SELECTEDVALUE ( v_DimCountrySoldTo[CountryEN] ) = "Austria",
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Column] ),
        v_DimDate[MonthNumber] IN { 1, 2, 12 }
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Column] ),
        v_DimDate[MonthNumber] IN { 1, 12 }
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Apr 2023 09:26:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202510#M116467</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-24T09:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a Distinctcount function by another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202532#M116470</link>
      <description>&lt;P&gt;this doesn´t work because the item Table is not connected to the Date table, i need to filter it by the measure but i don´t know how&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 09:34:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202532#M116470</guid>
      <dc:creator>Julie_</dc:creator>
      <dc:date>2023-04-24T09:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a Distinctcount function by another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202562#M116477</link>
      <description>&lt;LI-CODE lang="markup"&gt;Distinct count Jan Dec =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Column] ),
    FILTER ( VALUES ( 'Table'[Column] ), NOT ISBLANK ( [My Measure] ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;If column is enough to correctly identify the row and produce the value for the measure then this should work. If additional columns are needed in the filter context then you can replace VALUES with a SUMMARIZE statement including all necessary rows.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 09:48:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-Distinctcount-function-by-another-measure/m-p/3202562#M116477</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-24T09:48:13Z</dc:date>
    </item>
  </channel>
</rss>

