title: Kusto | Summarize count() multiple columns with where clauses
body: <p>I'm trying to get the count of multiple things in a Kusto query but having trouble getting it working. Let's say I have a sample table like this:</p>
  <pre><code>let SampleTable = datatable(Department:string, Status:string, DateStamp:datetime) 
  [
     &quot;Logistics&quot;, &quot;Open&quot;, &quot;05-01-2019&quot;,
     &quot;Finance&quot;, &quot;Closed&quot;, &quot;05-01-2020&quot;,
     &quot;Logistics&quot;, &quot;Open&quot;, &quot;05-01-2020&quot;
  ];
  </code></pre>
  <p>And I query like this:</p>
  <pre><code>SampleTable
  | summarize closedEntries = count() by (Status | where Status == &quot;Closed&quot;), 
      openEntries = (Status | where Status == &quot;Open&quot;),
      recentDates = (DateStamp | where DateStamp &gt; &quot;12-31-2019&quot;),
      Department
  </code></pre>
  <p>Expected results:</p>
  <p><a href="https://i.stack.imgur.com/nxaxH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nxaxH.png" alt="expected results" /></a></p>
  <p>But this gives an error &quot;The name 'Status' does not refer to any known column, table, variable or function.&quot; and the same error for DateStamp. I've also tried using extend and join but it's a mess.</p>