title: Azure Application Insights Analytics Query for exporting to Power BI
body: <p>I need some help for writing queries in AI Analytics with which i can generate kusto query and export the result to Power BI . I am new to query language in general ( didn't have much exp in sql also )</p>
  
  <p>So , I have created a  couple of custom events( lets say statusA and statusB ) in my app , which i will be getting in Customdimensions .  statusA and StatusB will be having lets say true or false . I should be able to get the result data as Status containing count of true/false values of StatusA and statusB each , so that i will be able to render it in a piechart. </p>
  
  <p>the query which i tried  : </p>
  
  <blockquote>
    <p>customEvents  | extend queryA = customDimensions.['StatusA'] , queryB
    = customDimensions.['StatusB'] | where queryA = true or queryB = true | project queryA, queryB | summarize count() by queryA , queryB</p>
  </blockquote>
  
  <p><a href="http://i.stack.imgur.com/8xe25.jpg" rel="nofollow">Result I got is this</a></p>
  
  <p>I want the result to be like this in pie chart :
     <a href="http://i.stack.imgur.com/Mi76I.jpg" rel="nofollow">Pie chart</a></p>