title: Index column based on column value in grouped data
body: <p>I'm trying to generate an index column in grouped data based on a text value.</p>
  <p>What I currently have is this:</p>
  <pre><code>#&quot;Changed Type&quot; = Table.TransformColumnTypes(#&quot;Filtered Rows1&quot;,{{&quot;Source.Name&quot;, type text}, {&quot;Team&quot;, type text}, {&quot;Project category&quot;, type text}, {&quot;Project type&quot;, type text}, {&quot;Role&quot;, type text}, {&quot;Month&quot;, type text}, {&quot;Value&quot;, type number}}),
  #&quot;Grouped Rows&quot; = Table.Group(#&quot;Changed Type&quot;, {&quot;Team&quot;, &quot;Project category&quot;, &quot;Month&quot;}, {{&quot;Count&quot;, each _, type table [Source.Name=nullable text, Team=nullable text, Project category=nullable text, Project type=nullable text, Role=nullable text, Month=nullable text, Value=nullable number, Index=number]}}),
  #&quot;Added Custom&quot; = Table.AddColumn(#&quot;Grouped Rows&quot;, &quot;Custom&quot;, each Table.AddIndexColumn([Count], &quot;#FCST&quot;, 1, 1))
  </code></pre>
  <p>Here is a subtable:</p>
  <p><a href="https://i.stack.imgur.com/KJuib.png" rel="nofollow noreferrer">Subtable</a></p>
  <p>What I would like is very similar, but I would like the index (#FCST here) on the subtable to be incremented only when the value in Source.Name changes.</p>
  <p>In this case the first 2 rows should stay as 1 and the 3th and 4th rows should be 2.</p>