title: Spotfire Sum over multiple levels
body: <p>I have an expense file that includes a separate record for each attendee but repeats the total expense amount.</p>
  
  <pre><code>Employee    Report ID   Transaction Date    Vendor           City/Location  Expense Type    Approved Amount Attendee Name
  John Smith  A           4/20/2016           UNITED AIRLINES  NYC            Airfare         317.1           Jane smith
  John Smith  A           4/20/2016           UNITED AIRLINES  NYC            Airfare         317.1           jack smith
  John Smith  A           4/20/2016           UNITED AIRLINES  NYC            Airfare         317.1           tom white
  John Smith  A           4/20/2016           Bar and Grill    NYC            Dinner          94.74           kelly thompson
  John Smith  A           4/20/2016           Bar and Grill    NYC            Dinner          94.74           joan ellen
  John Smith  A           4/20/2016           Bar and Grill    NYC            Dinner          94.74           albert coals
  </code></pre>
  
  <p>I need to sum the total of the expenses by city without duplicating the expense amount. I have tried the following custom expression while doing a cross table on city: </p>
  
  <pre><code>Sum(max([Approved Amount]) over (Intersect([Transaction Date],[Vendor])))
  </code></pre>
  
  <p>But this has resulted in</p>
  
  <pre><code>City  Amount
  NYC   1235.52
  </code></pre>
  
  <p>I am looking for a result like</p>
  
  <pre><code>City  Amount
  NYC   411.84
  </code></pre>
  
  <p>Any suggestions would be appreciated.</p>