title: Spotfire: UniqueSum in CrossTable
body: <p>Is there a way to use multi-table data in CrossTable together with Sum aggregation? Sample data looks like this:
  <a href="https://i.stack.imgur.com/EqKJx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EqKJx.png" alt="enter image description here"></a></p>
  
  <p>UniqueCount(actid) aggregation works perfect with joined data:
  <a href="https://i.stack.imgur.com/0uaqF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0uaqF.png" alt="enter image description here"></a></p>
  
  <p>But I have to calculate Sum of [bdg] column for each cell, and value for each distinct [actid] should be counted once. When using simply Sum(bdg) values are calculated expected incorrectly:
  <a href="https://i.stack.imgur.com/Ffhq9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ffhq9.png" alt="enter image description here"></a></p>
  
  <p>Highlited values should be 1010 and 1110 in this case. </p>
  
  <p>Does anyone have an idea how to get this working as required? Maybe there is some way to use related data tables or implement "UniqueSum" aggregation...</p>
  
  <p>Thanks in advance</p>