2 Replies Latest reply on Jun 27, 2016 12:06 PM by derek.dupont

    Question Regarding Counts and Aggregated Data Filters

    derek.dupont

      Hi all,

       

      I have a data set similar to the one in the attached sample workbook. Each record contains a user name value, a date value, and a yes/no value representing compliance for something. In Tableau, I then created a calculated field called "ComplianceRate" defined as follows:

       

      SUM(IF [Compliance] = "YES" THEN 1 ELSE 0 END)/SUM([Number of Records])

       

      I can use this to display the compliance rate for each user over any date category style - I use months in this workbook, but may want to use weeks or years at some point. I then want to filter on this aggregated value, so I created an AGG(ComplianceRate) filter. This all works as I expect it to.

       

      I then want to use a second sheet to display the count of users that meet this filter's criterion. So if I set the filter max to be 99%, the count would change from 3 to 2. I thought I could use CNTD(Users) to capture this, but I don't have the necessary aggregation performed, so it remains at 3.

       

       

      I could prepare the data in such a way that the compliance rate is pre-calculated on a monthly basis - then displaying the user count wouldn't use an aggregate filter like this. However, I like the ability to 1) display compliance value for individual days, and 2) edit the date grouping in Tableau. Does anyone have any advice on how to accomplish this?

       

      Thanks,

      Derek