title: How to aggregate over only distinct values in SAS Visual Analytics
body: <p>Assume we have the following table loaded as data source in SAS Visual Analytics:</p>
  
  <pre>
  =======================
  Day | objectID | Value
  1   |  1       | 1.5
  1   |  2       | 1.5
  1   |  3       | 3.2
  2   |  1       | 1.5
  2   |  2       | 1.5
  3   |  1       | 1.5
  3   |  4       | 4.3
  =======================
  </pre>
  
  <p>Now I want to get a sum of all distinct objectIDs over these 3 days (assumption is that value does not change over days).
  literary, I would like to get:</p>
  
  <pre>
  value_for_objectID_1 + value_for_objectID_2 + value_for_objectID_3 + value_for_objectID_4
  </pre>
  
  <p>which would be in this case <strong>1.5+1.5+3.2+4.3</strong>=10.5</p>
  
  <p>In form of a SQL query:</p>
  
  <pre>
  select sum(a.value) from (select distinct objectID, value from DATA_TABLE_ABOVE) a;
  </pre>
  
  <p>Since to my knowledge, SAS Visual Analytics does not offer SQL queries within chosen data source in the "Report Designer", how would one be able to aggregate value conditionally (in this case over distinct values of another column). Any hints/suggestions would be very helpful.</p>