title: Reset Count - If different value in specific column using C# lambda expression
body: <p>Is there a way to reset count after select? Here is sample in <a href="https://dotnetfiddle.net/3otZMh" rel="nofollow noreferrer">Fiddle</a>.</p>
  <p>This is the result I'm getting,</p>
  <pre><code>{groupRowId: 1, monthYear: '2020-08', projectName: 'Project 1'}
  {groupRowId: 2, monthYear: '2020-08', projectName: 'Project 2'}
  {groupRowId: 3, monthYear: '2020-08', projectName: 'Project 3'}
  {groupRowId: 4, monthYear: '2021-08', projectName: 'Project 4'}
  {groupRowId: 5, monthYear: '2021-08', projectName: 'Project 5'}
  {groupRowId: 6, monthYear: '2021-08', projectName: 'Project 6'}
  </code></pre>
  <p>This is what I've tried.</p>
  <pre><code>public List&lt;object&gt; GenerateDynamicCalendar(List&lt;ProjectResult&gt; result) {
              int row = 1;
       var queryAug = result.Where(c =&gt; c.LiveDate != Convert.ToDateTime(&quot;1900-01-01 00:00:00.000&quot;) &amp;&amp; c.LiveDate.Month == 8)
                .GroupBy(c =&gt; new { c.Month, c.Name})
                .Select(g =&gt; new DynamicProjectCalendarAug
                {
                    GroupRowId = row++,
                    MonthYear = g.Key.Month,
                    ProjectName = g.Key.Name,
                    Aug = g.Where(c =&gt; c.LiveDate != Convert.ToDateTime(&quot;1900-01-01 00:00:00.000&quot;) &amp;&amp; c.LiveDate.Month == 8).Max(c =&gt; c.Name)
                }).ToList();
          
              List&lt;object&gt; query = otherMonthResult.Cast&lt;object&gt;()
                  .Concat(queryAug)
              return query;
      }
  </code></pre>
  <p>And this is what I want to achieve. Since <strong>MonthYear</strong> value is different I want to reset count back to 1</p>
  <pre><code>{groupRowId: 1, monthYear: '2020-08', projectName: 'Project 1'}
  {groupRowId: 2, monthYear: '2020-08', projectName: 'Project 2'}
  {groupRowId: 3, monthYear: '2020-08', projectName: 'Project 3'}
  {groupRowId: 1, monthYear: '2021-08', projectName: 'Project 4'}
  {groupRowId: 2, monthYear: '2021-08', projectName: 'Project 5'}
  {groupRowId: 3, monthYear: '2021-08', projectName: 'Project 6'}
  </code></pre>