<?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: Remove duplicates and count from  date column in new table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4273876#M169553</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392269" data-lia-user-login="Jay2022" class="lia-mention lia-mention-user"&gt;Jay2022&lt;/a&gt;&amp;nbsp;, Use below steps&lt;/P&gt;
&lt;P&gt;Create a new table with unique dates and their counts:&lt;BR /&gt;UniqueDatesWithCount = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Dates column],&lt;BR /&gt;"Count", COUNT('Table'[Dates column])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Format the dates to "MMM, Year":&lt;BR /&gt;FormattedDatesWithCount = &lt;BR /&gt;ADDCOLUMNS(&lt;BR /&gt;UniqueDatesWithCount,&lt;BR /&gt;"FormattedDate", FORMAT('Table'[Dates column], "MMM yy")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Remove duplicates and count occurrences:&lt;BR /&gt;FinalTable = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;FormattedDatesWithCount,&lt;BR /&gt;[FormattedDate],&lt;BR /&gt;"Count", SUM([Count])&lt;BR /&gt;)&lt;BR /&gt;This will give you a table with the formatted dates and their counts without duplicates.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 10:41:07 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2024-11-07T10:41:07Z</dc:date>
    <item>
      <title>Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4273831#M169550</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have selected a dates column from another table and i now have them in a new column&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select Col =&lt;BR /&gt;SELECTCOLUMNS('Table')&lt;BR /&gt;,"Dates", 'Table'[Dates column])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have then changed the format of the dates to MMM,Year&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i have&lt;/P&gt;&lt;P&gt;Jan24&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feb 24&lt;/P&gt;&lt;P&gt;Feb 24&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mar 24&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now want to&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - remove duplicates&lt;/P&gt;&lt;P&gt;2- count the number of occurances for each month eg&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan 24 - 5&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feb 24 - 2 etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I do as above and count the occurances from the Dates Column from th eoriginal table or do i add another column to this table the same as Dates only without the duplciates and then count from the table containing the duplicates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it woudl look like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dates, Date_excluding_duplicates, Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help really apprecaited&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 10:21:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4273831#M169550</guid>
      <dc:creator>Jay2022</dc:creator>
      <dc:date>2024-11-07T10:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4273876#M169553</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392269" data-lia-user-login="Jay2022" class="lia-mention lia-mention-user"&gt;Jay2022&lt;/a&gt;&amp;nbsp;, Use below steps&lt;/P&gt;
&lt;P&gt;Create a new table with unique dates and their counts:&lt;BR /&gt;UniqueDatesWithCount = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Dates column],&lt;BR /&gt;"Count", COUNT('Table'[Dates column])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Format the dates to "MMM, Year":&lt;BR /&gt;FormattedDatesWithCount = &lt;BR /&gt;ADDCOLUMNS(&lt;BR /&gt;UniqueDatesWithCount,&lt;BR /&gt;"FormattedDate", FORMAT('Table'[Dates column], "MMM yy")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Remove duplicates and count occurrences:&lt;BR /&gt;FinalTable = &lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;FormattedDatesWithCount,&lt;BR /&gt;[FormattedDate],&lt;BR /&gt;"Count", SUM([Count])&lt;BR /&gt;)&lt;BR /&gt;This will give you a table with the formatted dates and their counts without duplicates.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 10:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4273876#M169553</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-11-07T10:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274173#M169566</link>
      <description>&lt;P&gt;Thanks first bit works fine but getting stuck on this bit&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Format the dates to "MMM, Year":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FormattedDatesWithCount =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ADDCOLUMNS(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UniqueDatesWithCount,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"FormattedDate", FORMAT('Table'[Dates column], "MMM yy")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;after FORMAT shoudl it be (UniqueDateswithCount'[Dates colum] basically from the new column i created &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 14:06:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274173#M169566</guid>
      <dc:creator>Jay2022</dc:creator>
      <dc:date>2024-11-07T14:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274181#M169569</link>
      <description>&lt;P&gt;i get the following&amp;nbsp; error&amp;nbsp; &amp;nbsp; &amp;nbsp;The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 14:09:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274181#M169569</guid>
      <dc:creator>Jay2022</dc:creator>
      <dc:date>2024-11-07T14:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274239#M169571</link>
      <description>&lt;P&gt;are these each 3 seperate tables ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 14:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274239#M169571</guid>
      <dc:creator>Jay2022</dc:creator>
      <dc:date>2024-11-07T14:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates and count from  date column in new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274846#M169597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392269" data-lia-user-login="Jay2022" class="lia-mention lia-mention-user"&gt;Jay2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;bhanu_gautam&amp;nbsp; for the quick reply. I have some other thoughts to add:&lt;/P&gt;
&lt;P&gt;(1) We can create a new table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Col = 
SELECTCOLUMNS('Table'
,"Dates", 'Table'[Date column])&lt;/LI-CODE&gt;
&lt;P&gt;(2) We can create columns on Col table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MMM_Year = FORMAT([Dates],"MMM yy")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Count = COUNTROWS(FILTER('Col',[MMM_Year]=EARLIER('Col'[MMM_Year])))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(3) We can create a&amp;nbsp;&lt;SPAN&gt;SUMMARIZE&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SUMMARIZE Table = SUMMARIZE('Col',[MMM_Year],[Count])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution &lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 02:27:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-duplicates-and-count-from-date-column-in-new-table/m-p/4274846#M169597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-08T02:27:50Z</dc:date>
    </item>
  </channel>
</rss>

