<?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 items per day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619483#M139920</link>
    <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="670344" data-lia-user-login="gabriela_al1" class="lia-mention lia-mention-user"&gt;gabriela_al1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;if you need only count of new item then take diference of item number bw &lt;STRONG&gt;present day&lt;/STRONG&gt; and &lt;STRONG&gt;previous day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure =
var a = SELECTEDVALUE(All_checks[Date])
var a = calculate(
          distinctcount(All_checks[ITEMNUMBER]),
           All_checks[date] = a
         )

var b = calculate(
          distinctcount(All_checks[ITEMNUMBER]),
           All_checks[date] = a-1
         )
return
a-b&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 06 Jan 2024 17:33:39 GMT</pubDate>
    <dc:creator>Dangar332</dc:creator>
    <dc:date>2024-01-06T17:33:39Z</dc:date>
    <item>
      <title>Distinct items per day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619358#M139910</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to create a DAX measure that calculcates the new&amp;nbsp; items per day.That means,for each day,it should check if the item exist in the day before and if not,it is a new item and therefore should be counted.&lt;/P&gt;&lt;P&gt;Important note is that my model is DirectQuery and functions like EARLIER would not work :(.&lt;/P&gt;&lt;P&gt;This is what I have done so far,but this DAX measure is not optimal since there is a lot of itemnumbers that should be evaluated.&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;VAR CurrentDate = SELECTEDVALUE(All_checks[Date])
VAR PreviousDate = CurrentDate - 1
RETURN
    CALCULATE(
        COUNTROWS(
            FILTER(
                All_checks,
                All_checks[Date] = CurrentDate &amp;amp;&amp;amp;
                NOT (
                    All_checks[ITEMNUMBER] IN
                    CALCULATETABLE (
                        VALUES(All_checks[ITEMNUMBER]),
                        All_checks[Date] = PreviousDate
                    )
                )
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated.Thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 14:53:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619358#M139910</guid>
      <dc:creator>gabriela_al1</dc:creator>
      <dc:date>2024-01-06T14:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct items per day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619483#M139920</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="670344" data-lia-user-login="gabriela_al1" class="lia-mention lia-mention-user"&gt;gabriela_al1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;if you need only count of new item then take diference of item number bw &lt;STRONG&gt;present day&lt;/STRONG&gt; and &lt;STRONG&gt;previous day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure =
var a = SELECTEDVALUE(All_checks[Date])
var a = calculate(
          distinctcount(All_checks[ITEMNUMBER]),
           All_checks[date] = a
         )

var b = calculate(
          distinctcount(All_checks[ITEMNUMBER]),
           All_checks[date] = a-1
         )
return
a-b&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 06 Jan 2024 17:33:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619483#M139920</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-01-06T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct items per day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619507#M139925</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="670344" data-lia-user-login="gabriela_al1" class="lia-mention lia-mention-user"&gt;gabriela_al1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;one of possible solution is to count rows in your Date / Calendar table like with DAX.DO example on &lt;A href="https://dax.do/wdfwg7hgLqUkua/" target="_self"&gt;link&lt;/A&gt; and picture below&lt;/P&gt;
&lt;P&gt;Sorry, correct link is &lt;A href="https://dax.do/wdfwg7hgLqUkua/" target="_self"&gt;this&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Your measure could be something like below&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CALCULATE (&lt;BR /&gt;COUNTROWS ( 'Date' ),&lt;BR /&gt;FILTER ( __table_dates_sales, [Sales] = BLANK () )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;adjust your table names and other&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 18:30:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-items-per-day/m-p/3619507#M139925</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2024-01-06T18:30:39Z</dc:date>
    </item>
  </channel>
</rss>

