<?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 Unique or Duplicate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3927734#M152801</link>
    <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data file where the ticket number sometimes appears more than once and I'd like to create a column that says single or duplicate, but that when there is a duplicate the first incident comes up as single and the others as duplicate.&lt;BR /&gt;I've used a formula, but this way they both come up as duplicates and not just the second one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unique/Duplicate =&lt;BR /&gt;VAR currRowValue = SELECTEDVALUE('YourTable'[YourColumn])&lt;BR /&gt;VAR countPrevOccur =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;'YourTable',&lt;BR /&gt;'YourTable'[YourColumn] = currRowValue&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(countPrevOccur &amp;gt; 1, "Duplicate", "Unique")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need another opinion to solve this problem. I am not expert with power bi yet. I know how to do it with excel but not using power bi. Tks&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 14:06:01 GMT</pubDate>
    <dc:creator>FelippeAzevedo7</dc:creator>
    <dc:date>2024-05-17T14:06:01Z</dc:date>
    <item>
      <title>Unique or Duplicate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3927734#M152801</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data file where the ticket number sometimes appears more than once and I'd like to create a column that says single or duplicate, but that when there is a duplicate the first incident comes up as single and the others as duplicate.&lt;BR /&gt;I've used a formula, but this way they both come up as duplicates and not just the second one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unique/Duplicate =&lt;BR /&gt;VAR currRowValue = SELECTEDVALUE('YourTable'[YourColumn])&lt;BR /&gt;VAR countPrevOccur =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;'YourTable',&lt;BR /&gt;'YourTable'[YourColumn] = currRowValue&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(countPrevOccur &amp;gt; 1, "Duplicate", "Unique")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need another opinion to solve this problem. I am not expert with power bi yet. I know how to do it with excel but not using power bi. Tks&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 14:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3927734#M152801</guid>
      <dc:creator>FelippeAzevedo7</dc:creator>
      <dc:date>2024-05-17T14:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unique or Duplicate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3927888#M152814</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="736722" data-lia-user-login="FelippeAzevedo7" class="lia-mention lia-mention-user"&gt;FelippeAzevedo7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want the first item of a duplicate ticket to appear as a single one, you will also need a sort field to determine the order, such as date, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can refer to the column expression below.&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;LI-CODE lang="markup"&gt;Unique/Duplicate = 
VAR CurIndex = 'Table'[Index]
VAR MinIndex = CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Ticket]))
RETURN
IF(CurIndex=MinIndex,"Single","Duplicate")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&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>Fri, 17 May 2024 15:11:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3927888#M152814</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-17T15:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unique or Duplicate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3928304#M152842</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many tks for the support.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 19:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unique-or-Duplicate/m-p/3928304#M152842</guid>
      <dc:creator>FelippeAzevedo7</dc:creator>
      <dc:date>2024-05-17T19:09:45Z</dc:date>
    </item>
  </channel>
</rss>

