title: Sum records based in two variables
body: <p>I'm trying to achieve the number of hits that was achieved in a month, I've tried several SUM formulas but I'm stuck, can you help me to solve this?
  I've retrieved from DB the month 1 and month 2 total of hits, as you can see there are 2 source types, 1 and 2 and several hit types 1 to 6.
  The goal is to find the number of hits for each type on the period grouped by the source.</p>
  
  <pre><code>Source  type        number         time
  1        1          200            2015-02-01 00:00:25.000
  1        2          350            2015-02-01 00:00:25.000
  1        3           50            2015-02-01 00:00:25.000
  1        4         1000            2015-02-01 00:00:25.000
  2        1          360            2015-01-01 00:00:20.000
  2        2           30            2015-01-01 00:00:20.000
  2        3          500            2015-01-01 00:00:20.000
  2        4          250            2015-01-01 00:00:20.000
  1        1          200            2015-01-01 00:00:20.000
  1        2          350            2015-01-01 00:00:20.000
  1        3           50            2015-01-01 00:00:20.000
  1        4         1000            2015-01-01 00:00:20.000
  2        1          360            2015-02-01 00:00:25.000
  2        2           30            2015-02-01 00:00:25.000
  2        3          500            2015-02-01 00:00:25.000
  2        4          250            2015-02-01 00:00:25.000
  </code></pre>
  
  <p>Ex
  February Number of hits </p>
  
  <pre><code>Source1 Sum(type1+type4) of 2015-01-01  - Sum(type1+type4) of 2015-02-01
  </code></pre>
  
  <p>I know it seem confused but is the only way that I find to explain.</p>
  
  <p>thanks in advance </p>
  
  <p>carlos</p>