1 Reply Latest reply on Sep 25, 2012 11:48 AM by Jonathan Drummey

    help with calculating affinity

    Jim Stanley

      I know how to do this in Excel with pivots but not in Tableau - any help appreciated.

       

      I have detailed log data that logs unqiue consumers' visits to different destinations. What I want to do is show is how many customers have visited different locations. here's what my data looks like:

       

      Unique user IDvisit timeStore visited
      Unique I1-SepStore A
      Unique 21-AprStore A
      Unique 31-JulStore B
      Unique 413-AprStore D
      Unique 314-MayStore B
      Unique I1-MayStore C
      Unique 22-JunStore A
      etcetcetc

       

      In Tableau easy to view it like so (where the cells are the number of visits from a unique customer):

       

      Unique user IDStore AStore BStore CStore DStore Eetc
      Unique I10
      1

      Unique 242


      Unique 3
      1


      Unique 4
      321
      Unique 5



      1
      Unique 6



      3
      Unique 7



      1
      Unique 8
      5

       

      But what I want is to aggregate it like so:

       

      Unique stores visitedUniquesFrequency
      3114%of all customers visited 3 different stores
      2225%of all customers visited 2 different stores
      1563%of all customers visited only 1 store

       

      How would you create this calculation?

       

      Thanks again for any help.

       

      --Jim