Simple count of unique responses by location
This should be easy I think.
I have an app that produces survey response data in a pattern something like the simple example shown. Each row is a response to a question, and each response is tagged with a "ResponseGroupID" that ties them together as having been entered as part of a single "batch". I'm finding it easy to aggregate individual response values (not shown below) but I'm having trouble simply counting how many "batches" (as identified by their ResponseGroupID) each location has.
Table I would like
Table I get
Using a mega-table and adding location and my calculated field
The formula I'm using in 'Distinct ResponseGroupIDs is
Not sure if I have to create separate grouped by tables in the data flow but I'm trying to avoid additional complexity when possible and this seems as though it should be simple. Using Sum(COUNT(DISTINCT `ResponseGroupID`) in the calculated field doesn't work. Should this be done in the SQL flow that produces the model?