3 Replies Latest reply on Apr 30, 2015 1:42 AM by Cyril BELMEHDI

    How do I count the number of Customer ID?

    Tae Hoon Lee

      Hi, can anyone tell me how to count the number of Customer ID?

      I have this huge excel file with many Customer IDs in numbers.

      Tableau just keep sums up the ID numbers.

      I want to count the number of Customer ID to see how many customers there are.

      For example

      Customer ID

      1000

      1001

      1002

      1003

       

      Then it should say 4

       

      Can anyone please help me with this?

        • 1. Re: How do I count the number of Customer ID?
          Shawn Wallwork

          Tae move the ID field to from the Measure window to the Dimension window. Then right-click drag it into your view and select COUNT() or COUNTD() as the aggregation. ID type fields are normally best to be dimensions, as they really aren't something we normally want to SUM().

           

          Cheers,

           

          --Shawn

          • 2. Re: How do I count the number of Customer ID?
            Alexander Mou

            1.right click on Customer ID and select data type to be STRING.

            2.right click it and hold and drag to the Text/Label shelf

            3.select the option CountD

             

            you will get the desired count.

             

             

            On Wed, Apr 29, 2015 at 6:49 PM, Tae Hoon Lee <

            • 3. Re: How do I count the number of Customer ID?
              Cyril BELMEHDI

              It depends on what you want to achieve. For example if you want to have this :

               

              Customer ID   count

              1000                4

              1001                4

              1002                4

              1003                4

               

              You have to do a : WINDOW_COUNT(COUNTD([Customer ID]))

               

              But if you want this :

               

              Customer ID   count

              1000                1

              1001                2

              1002                3

              1003                4

               

              Then you do a RUNNING_SUM(COUNTD([Customer ID]))

               

              Etc ... You have to be more specific and send an example

               

              Thanks