4 Replies Latest reply on May 11, 2016 10:45 AM by pooja.gandhi

    Percent of total records

    Rupali Negi

      Hi All,

       

      I have a question. I am novice in Tableau so I am get hard time to solve a simple problem.

      I have data as below.The scenario was same Account ID splitting into more than one Sales ID. I applied few filters and got the expected result.Now there are total number of 1500 account Id's out of which only few satisfied my criteria some of which are as below.

      I want to find the metrics of population affected.

      Ex: (distinct account ID/total Account id)*100%

      (6/1000)*100%

       

      Can this be done in tableau? Or it is much better to do it manually?I am sure tableau can definitely do it more easily.Can someone help me here.

         

      Account IDSales IDAccount Name
      63007894558ACCENTURE
      63007894564ACCENTURE
      63007894619ACCENTURE
      303005856186IBM
      303005856202IBM
      823010732079BSNL
      823015548258BSNL
      823002101724BSNL
      1783000847212ICBC
      1783015548198ICBC
      1783015548258ICBC
      2863002674742Royal Bank of Canada
      2863002674768Royal Bank of Canada
      2863002674769Royal Bank of Canada
      3283014143548Symantec
      3283014143552Symantec

       

      Thanks

      Lucky

        • 1. Re: Percent of total records
          msa s

          is this fine or are you looking for  different one

          • 2. Re: Percent of total records
            Rohan Malusare

            Hi Rupali,

             

            You can try this

             

            Thanks and Regards,

            Rohan Malusare.

            • 3. Re: Percent of total records
              Rupali Negi

              Hi MSA/Rohan,

              Thanks for your reply. Actually my requirement is little different. My data is like

               

              Account IDSales IDAccount Name
              63007894558ACCENTURE
              63007894564ACCENTURE
              63007894619ACCENTURE
              303005856186IBM
              303005856202IBM
              823010732079BSNL
              823015548258BSNL
              823002101724BSNL
              1783000847212ICBC
              1783015548198ICBC
              1783015548258ICBC
              2863002674742Royal Bank of Canada
              2863002674768Royal Bank of Canada
              2863002674769Royal Bank of Canada
              3283014143548Symantec
              3283014143552Symantec
              CEC345676983294AMDOC
              CEC8798798798438COSTCO
              CEC0989786688WALMART
              87687987927409NIKE

               

               

              So out of these I have to only pick the records which has one to many relationship.Like

              Account IDSales IDAccount Name
              63007894558ACCENTURE
              63007894564ACCENTURE
              63007894619ACCENTURE
              303005856186IBM
              303005856202IBM
              823010732079BSNL
              823015548258BSNL
              823002101724BSNL
              1783000847212ICBC
              1783015548198ICBC
              1783015548258ICBC
              2863002674742Royal Bank of Canada
              2863002674768Royal Bank of Canada
              2863002674769Royal Bank of Canada
              3283014143548Symantec
              3283014143552Symantec

               

              Now in this I have to calculate distinct Account Id's and find the percent total to calculate percent of population affected -->

              (6 distinct affected account id's/total number of distinct account id's)* 100% = (6/10)*100%

               

              I am not sure what I require is feasible in tableau or not?

              • 4. Re: Percent of total records
                pooja.gandhi

                That would be a calculation like:

                 

                countd(if {fixed [Account ID] : count([Sales ID]) } > 1 then [Account ID] end) / countd([Account ID])

                 

                1 of 1 people found this helpful