1 Reply Latest reply on Apr 12, 2016 6:52 AM by Andrew Connolly

    Tableau 9.3  - Running Distinct

    James Stoll

      Greetings,

       

      I have read a number of threads on this forum regarding running distinct but I still can't seem to get it right and most seem to be related to earlier versions of Tableau, hoping something has changed or more up to date advice can be provided.  My goal is to show an unique number of accounts graphed over time however whenever I try to do a running distinct it only measures it within that timespan I am trending for (I.e. Month) - rather than assessing if an additional account has been added in each new month.

       

      Note i cannot just do some fixed calculations because there is many months/years in this data set rather than a few recent months.

       

      My expectation is like the following:

       

      Month (accounts)

      January (a, a, b, b, c)

      Running Distinct = 3

       

      February (b, b, c, d, e)

      Running Distinct = 5

       

      March (a, b, e, f)

      Running Distinct = 6 ect...

       

      If there is an applicable way to do this in sql (unfortunately ms access sql) without pivoting the data set which will mess with trending capabilities please let me know. 

      I can't seem to be able attach an excel spreadsheet for sample set but here it is listed below:

       

      Thanks for help,

      James

        • 1. Re: Tableau 9.3  - Running Distinct
          Andrew Connolly

          My first reply misunderstood your question, but I believe this will work:

           

          { FIXED [Customer ID]: MIN([Order Date])}

           

          You want to return the minimum order date for each customer. Or in your case, the first month for each account.

           

          This date field then goes on the column shelf. On the rows shelf you want a COUNTD of your account field. Then you can right click on that pill and select 'Running Total' from the quick table calc menu