<?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: How filter a table that has the latest date and only include that in the count aggregation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-filter-a-table-that-has-the-latest-date-and-only-include/m-p/1437451#M26875</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="257755" data-lia-user-login="pluto556" class="lia-mention lia-mention-user"&gt;pluto556&lt;/a&gt; , Try like, hope these work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;total product = distinctcount(Table[product])&lt;BR /&gt;product GT .8 = calculate( distinctcount(Table[product]), Table[Metrics] &amp;gt;.8)&lt;/P&gt;
&lt;P&gt;percent= divide([product GT .8],[total product])&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2020 04:44:12 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-10-16T04:44:12Z</dc:date>
    <item>
      <title>How filter a table that has the latest date and only include that in the count aggregation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-filter-a-table-that-has-the-latest-date-and-only-include/m-p/1437406#M26870</link>
      <description>&lt;P&gt;Hi community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a bit of a complicated case here. I'm pulling in data from a model that runs everyday to score a metric. I'm pulling in the new scores to a dashboard that has a chart with the refreshed date as the x-axis and the number of products that exceed a score of 0.8.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some sample data I put together:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Some products are not scored everyday. In fact, most products are not scored everyday. What I'm interested in doing is to count the distinct number of products that exceeded the score 0.8 on their latest score date. For example, product c received a score of 0.3 on 2020/09/13 so in the chart, c not counted as exceeding 0.8 eventhough previous scores may have been over 0.8.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The chart of calculation looks like below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at the date 09/07/2020, the number of discount counts of products with metric &amp;gt;= 0.8 is 3 even though 2 of the products scored on 09/07/2020 have metric exceeding 0.8. That's because product d was scored on 09/04/2020 but not on 09/07/2020 and d needs to be counted on the 09/07/2020 aggregation as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In essence, the total distinct number of products scored remain at 4 unless new products other than a,b,c,d are scored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want to be able to visualize it like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any idea how I can achieve this on Power BI?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 04:08:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-filter-a-table-that-has-the-latest-date-and-only-include/m-p/1437406#M26870</guid>
      <dc:creator>pluto556</dc:creator>
      <dc:date>2020-10-16T04:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How filter a table that has the latest date and only include that in the count aggregation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-filter-a-table-that-has-the-latest-date-and-only-include/m-p/1437451#M26875</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="257755" data-lia-user-login="pluto556" class="lia-mention lia-mention-user"&gt;pluto556&lt;/a&gt; , Try like, hope these work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;total product = distinctcount(Table[product])&lt;BR /&gt;product GT .8 = calculate( distinctcount(Table[product]), Table[Metrics] &amp;gt;.8)&lt;/P&gt;
&lt;P&gt;percent= divide([product GT .8],[total product])&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 04:44:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-filter-a-table-that-has-the-latest-date-and-only-include/m-p/1437451#M26875</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-10-16T04:44:12Z</dc:date>
    </item>
  </channel>
</rss>

