I am having issues replicating the sum from the "Totals" section of a table visualization into a KPI. The "Total" defaults to the value I keep getting in the KPI, but I am trying to get the value I get when I change the Totals function to "sum". I am counting distinct users (user_id) over a particular dimension (segment_id). The KPI keeps returning the distinct count across all the segment_id's, so if someone was in multiple, in only counts them once. The visualization sums per segment_id, so I get the desired total. I am pretty sure a pretty basic AGGR should solve this, but I can't get it to work. Here is the measure I am using for the user_id count:
I believe this may have summed the actual values instead of the counts. I attached a pic of my visualization (and just noticed I spelled "unique" wrong). Disregarding the middle 2 fields, you can see the counts by segment_id. A user could be across all of these, and I need the 11,041 to show up in the KPI. I keep getting ~5400 since it is giving me unique across the board, and not summing the totals like the visualization is. The formula you sent is giving me ~1.2 million, which is why I think it is summing the values (segment_id?).