3 Replies Latest reply on Sep 27, 2016 1:55 PM by Tim Watson

    Trying to sum for each customer type across months

    Tim Watson

      I'm not sure how to summarize this without showing the data:

      For each month, for each client, I have the number of service requests.  I want to be able to look at the distribution (e.g. how many had 1, 2, 3, or 9 requests) for that time period.  By default, I can get this, but it's for each month (like the data) in the attached.


      When I change my date filter to represent multiple months, is there a way to get Tableau to re-calculate for each client the number of service requests?  For example, if client abc had 5 requests in January, and 4 requests in February, I want Tableau to mark that as one point with 9 requests, rather than 2 points, one at 5 and another at 4.


      My SQL to get the data I want would be like:

      select requests, count(*) as clients

      from (select client ID, sum(requests) as requests from data_table where month between start_mth and end_mth group by 1) agg_data

      group by 1;


      Is there a way to get Tableau to re-do that client level calculation over a different date range?

      Thank you,