6 Replies Latest reply on May 3, 2018 1:04 AM by Yvonne Cheng

    Calculation - Remove duplicates

    Anu Chandra

      Hi,

       

      Find the attached excel. Basically, I'm trying to put each of my projects into one of 7 groups. So if a projects falls under Group1, I do not want to see in any other group. So Hierarchy is by group number, It's like Group1, Group2, Group3, Group4 etc..There is lot of duplication in Group 5, 6, 7 & 8. Is there a way to handle this in calculation. I have highlighted cell where they are duplicated.

       

      Thanks in advance for your help,

      Anu

        • 1. Re: Calculation - Remove duplicates
          Deepak Rai

          Hi Anu,

          Please find attached. I created a calculation and wherever there is duplicate , they have been filtered out by calculation to get this:

          Hope it Helps!!

          Let me know.

          Thanks

          Deepak

          1 of 1 people found this helpful
          • 2. Re: Calculation - Remove duplicates
            Anu Chandra

            Deepak,

             

            That's working for the sample excel I have put together but I have to apply the same logic to the work book. Can you please explain Calculation1 for me? And include date field in your work book. At the end I have to represent the data like below but remove dupes from Group5.

             

             

             

            Thanks for all your help,

            Anu

            • 3. Re: Calculation - Remove duplicates
              Deepak Rai

              Hi Anu,

              The Calculation 1 identifies duplicates and gives a value of 1 to first occurence and 0 to other occurances. Suppose 12345 occurs three times , then it would be assigned 1 at first instance and rest 2 instances would be 0. Then I filtered out all 0s. That was answer to your first question. Your next part is easy. you can create the view yearwise using Distinct or Count of ProjectID , they would be same as values are distinct  and color them on groups. That's it.

              Please mark my reply as Helpful and CORRECT to close this thread, if it answered your first question. You can always ask additional questions in same thread.

              Thanks

              Deepak

              • 4. Re: Calculation - Remove duplicates
                Anu Chandra

                Thanks for your help with this Deepak!

                • 5. Re: Calculation - Remove duplicates
                  Justin Snyder

                  I am running into a similar issue, and would like to be able to number each instance of a duplicate ID number. However, since I'm using Tableau Public, I can't open the attached workbook to look at "Calculation1".

                   

                  What formula(s) are used to run through the ID field and interatively add evaluate its status as a duplicate?

                   

                  Any help would be greatly appreciated!

                  • 6. Re: Calculation - Remove duplicates
                    Yvonne Cheng

                    Hi Deepak,

                     

                    I tried your calculation, it works in text format but when apply the filter in bar chart it does not give what I want (filter out many vessels).

                    My goal is to build a bar chart in which both CNT(Stop Time) and Sum(Duration) remove duplicates. If possible, the duplicated records (same stop time at vessel level) could be filter out from the data source

                     

                    Attached Mock data for your reference.