title: Excel 2010 Pivot Table: Count based on 2 flags
body: <p>*I'd like to ask that you please do not just say "add a column to your data that..."
  *I want to know if the pivot table itself can do this.</p>
  
  <p>My data comes from a sql query. The query is inserted into excel via the Data->From Other Sources path. So, going in to edit the query within excel, or open the query itself, editing, and repasting is not ideal, especially when the excel file needs to be distributed.</p>
  
  <p>My raw data is set-up like this. I've put zeros in for blanks, but my flags are either 1 or blank (empty cell)</p>
  
  <pre><code>id   costa costb names ... ... flagA flagB flagC
  1    1000  2000  apple ... ... 1     1     1
  2    2300  1200  brake ... ... 1     0     1
  3    4600  3400  candy ... ... 0     1     1
  4    6900  4300  drill ... ... 1     0     0
  </code></pre>
  
  <p>I want my pivot table to COUNT occurence of items that are flagb and flagc.
  Usually with only one flag. Your calculated field will be a SUM with formula ='flagb'
  How can I make the field bebased on two flags, not just one?</p>
  
  <p>Again. I don't want to add a new column to my data as certain flags do not correlate easily, and I have to change the orignial SQL file, as well as the query inserted to excel to stay consistent. Also, I feel the pivot should be able to do this. Any solutions?</p>