title: How to Get Distinct Value of DataTable and Append New Column with the Count of each distinct value returned [UIPath][VB.Net]?
body: <p>I am a newbie in UIPath.
  I have a DataTable with these headers:</p>
  
  <p>1.) Date</p>
  
  <p>2.) Error</p>
  
  <p>I want to extract a Distinct Date for every error, and use this code:</p>
  
  <pre><code>dtQuery = ExtractDataTable.DefaultView.ToTable(True,{"Date","Error"})
  </code></pre>
  
  <p>With this, I get my desired result. My problem is how can I append (a new Column, "Count") EACH COUNT of DISTINCT VALUES given? For Example:</p>
  
  <pre>DATE       |  ERROR               |  COUNT
  
  2/27/2019  |  Admin Query String  |  
  
  2/27/2019  |  404 Shield          |  
  
  2/26/2019  |  404 Shield          |  
  
  2/25/2019  |  404 Shield          |  
  
  2/25/2019  |  Admin Query String  |  </pre>
  
  <p>I tried to use ADD DATA COLUMN ACTIVITY with these properties:</p>
  
  <pre><code>Column Name = "COUNT"
  Data Table = dtQuery
  DefaultValue = ExtractDataTable.DefaultView.ToTable(True,{"Date","Error"}).Rows.Count
  </code></pre>
  
  <p>But by using this, it gives me this:</p>
  
  <pre><code>DATE       |  ERROR               |  COUNT
  
  2/27/2019  |  Admin Query String  |  5
  
  2/27/2019  |  404 Shield          |  5
  
  2/26/2019  |  404 Shield          |  5
  
  2/25/2019  |  404 Shield          |  5
  
  2/25/2019  |  Admin Query String  |  5
  </code></pre>
  
  <p>Thanks in advance! Happy coding!</p>