title: How to create an Azure Kusto query to group by client OS name only (OS version removed) on App insights?
body: <p><strong>What I want</strong></p>
  
  <p>The number of page views grouped by client OS (no OS version = only OS name) and week.</p>
  
  <p><strong>What I have</strong> - Kusto query:</p>
  
  <pre><code>pageViews
  |where timestamp &gt; ago(90d)
  |summarize Browser_hits = count() by Date = startofweek(timestamp), client_Browser
  |sort by Date   
  |render timechart
  </code></pre>
  
  <p>The problem with this query is that the client OS name is coming with the version in it and that ends up in different versions grouping separately (see picture below).</p>
  
  <p><a href="https://i.stack.imgur.com/uxIx8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uxIx8.png" alt="enter image description here"></a></p>
  
  <p><strong>Update</strong></p>
  
  <p>This is close to what I need but it won't work for any names, I'm just posting this as an example that helps to understand the actual question.</p>
  
  <pre><code>pageViews
  |where timestamp &gt; ago(90d)
  |summarize Browser_hits = count() by Date = startofweek(timestamp), BrowserNameTrimed = substring(client_Browser,0,5)
  | sort by Date   
  | render timechart
  </code></pre>
  
  <p>With the previous query I get this (kind of cheating):</p>
  
  <p><a href="https://i.stack.imgur.com/SG2ZL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SG2ZL.png" alt="enter image description here"></a></p>