<?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: Distinct Count with Filter- Year Minus 1,2 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693091#M143567</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210072" data-lia-user-login="Dailem" class="lia-mention lia-mention-user"&gt;Dailem&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Can you provide some example data that can be used to more clearly articulate the problem you are experiencing.&amp;nbsp;&amp;nbsp;Please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 01:04:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-12T01:04:43Z</dc:date>
    <item>
      <title>Distinct Count with Filter- Year Minus 1,2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693022#M143561</link>
      <description>&lt;P&gt;I'm trying to get a distinct count of accounts that are filtered to only include accounts with Amount &amp;gt; 0.&amp;nbsp; The measure below gives me that count based upon the existing slicer quarter that I have selected (I have a Calendar in my model, but then a reporting calendar which only shows quarter-end dates).&amp;nbsp; So my report is filtered to 9/30/2023, for example:&lt;/P&gt;&lt;P&gt;Measure1 =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT(Table1[AccountKey]),&lt;BR /&gt;FILTER(Table1, Table1[Amount] &amp;gt; 0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...however, I am trying to look at this same measure one year ago, two years ago, etc..&amp;nbsp; I have another measure that looks at prior year sales by filtering using the following in a calculate function:&lt;/P&gt;&lt;P&gt;dateadd('Calendar'[Date],-1,year)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...I have tried to add a second filter, but I cannot seem to get it to work properly.&amp;nbsp; When it does work, it only returns the existing date distinct counts- not those from the prior year.&amp;nbsp; How can I add a date filter on top of my existing Measure1 above to return the prior year account counts?&amp;nbsp; Any help is greatly appreciated!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2024 22:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693022#M143561</guid>
      <dc:creator>Dailem</dc:creator>
      <dc:date>2024-02-11T22:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count with Filter- Year Minus 1,2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693091#M143567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210072" data-lia-user-login="Dailem" class="lia-mention lia-mention-user"&gt;Dailem&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Can you provide some example data that can be used to more clearly articulate the problem you are experiencing.&amp;nbsp;&amp;nbsp;Please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 01:04:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693091#M143567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-12T01:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count with Filter- Year Minus 1,2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693241#M143573</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but please try creating the semantic model's relationship between Calendar Table and Fact Table by using Calendar[Date] column, not Calendar[QuarterEndDate] column.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 03:50:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693241#M143573</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-02-12T03:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count with Filter- Year Minus 1,2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693956#M143622</link>
      <description>&lt;P&gt;I was able to resolve this on my own.&amp;nbsp; The way that I was able to get the result was to use the initial measure in a second measure.&amp;nbsp; So first measure is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure1 =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT(Table1[AccountKey]),&lt;BR /&gt;FILTER(Table1, Table1[Amount] &amp;gt; 0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...second measure is&lt;/P&gt;&lt;P&gt;Measure2 =&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(Measure1, &lt;SPAN&gt;dateadd('Calendar'[Date],-1,year))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...this returns the same distinct count of the accountkey column, but does so for the prior year.&amp;nbsp; Thanks for all who responded!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 11:56:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-Count-with-Filter-Year-Minus-1-2/m-p/3693956#M143622</guid>
      <dc:creator>Dailem</dc:creator>
      <dc:date>2024-02-12T11:56:52Z</dc:date>
    </item>
  </channel>
</rss>

