Skip to main content

Hi everyone, I am trying to count the same name appeared in different activities and count total volume, then calculate the percentage of repeat rate.

eg:200 same name appeared in 2017 promotion 1 and 2018promotion 1, and total volume of 2017 promotion 1 and 2018 promotion 1 is 1000 & 400, so the 2017 repeat rate is 20%(200/400*100%).

 

It seems easy to answer the issues via Excel but I am trying to use Tableau Desktop to deal with the huge dataset.

 

Data structure like this:

 

NameActivitiesMark2017Promotion1Lily2017Promotion2Candy2017Promotion3Wang2018Promotion1Wang2019promotion1Mason2017Promotion1Liam2017Promotion2Ethan2017Promotion3Ethan2018Promotion1Jacob2019promotion1Noah2017Promotion1Larry2017Promotion2Larry2017Promotion3Noah2018Promotion1Noah2019promotion1

 

Thank you guys all!

2 answers
  1. Aug 12, 2019, 11:27 AM

    Hello Steven,

     

    Solution 1:

    You can split the field 'Activities' which will give you year of the activities in a separate column 'split-1' and activity like 'Promotion1' in other column 'split-2' then you can make following calculation:

     

    calculation 1:

    {fixed [Name], [split-2] : SUM(Number of Records)}

     

    calculation 2:

    {fixed [split-2] : SUM(Number of Records) }

     

    calculation 3: calculation 1/calculation 2

     

    This should solve your problem but if it doesn't, please consider uploading a TWBX file (with mocked up data if nout with original data).

     

    Regards,

    Shekhar Hazari

0/9000