1 Reply Latest reply on Dec 8, 2016 1:46 PM by Jim Murphy

    Calculate & report difference and percent difference using Count(Distinct)

    Jim Murphy

      I have data (student applications to our university) that I'm aggregating from multiple years (currently 2017 and 2016).  The raw data is not guaranteed to be de-duplicated so instead of reporting on <Number of Records>, I am using Count(Distinct) on my applicant ID.  I also have multiple columnar sections ("Total Applications', 'Complete Applications', etc.) that I need to calculate the Difference and Percent of Difference (from 2016 to 2017) within each column section (change in 2016 to 2017 Total Applications.   Change in 2016 to 2017 Complete Applications.).

       

      I have attached a sample packaged workbook (w/ fake IDs) and a sample Excel worksheet that I am wishing to reproduce in Tableau.

        • 1. Re: Calculate & report difference and percent difference using Count(Distinct)
          Jim Murphy

          I think using Table Calcs (Difference From & Percent Difference From) on Year, 'Relative to Next' is probably the best solution to my (simple) challenge.

           

          My original Excel sheet displayed the Counts (for both years) to the left of the Diff and % columns (' 2017 ---- 2016 ---- Diff ---- %'), but I'm not sure that will be possible with Tableau, since the Diff and % belong to a specific year (' 2017 count ---- Diff ---- %  |  2016 count ... ').  If anyone thinks they are able to help me place the Diff and % counts to the right of the years (' 2017 ---- 2016 ---- Diff ---- %'), let me know.