2 Replies Latest reply on Jul 20, 2016 9:48 AM by Simon Runc

    Duplicates Filters and labels

    sandra cuentas

      Dear Community,


      Currently I have a series of observations plotted against time (worksheet 1). Every point may contain one or more elements. I am interested in points than contain more than one element because that would mean I have a duplicate for that specific time point in that particular ID.

      I plotted IDs vs time and filtered data using a calculation filter with the following formula: IF (COUNT([Número de registros]))>1 THEN "MOSTRAR" ELSE "NO MOSTRAR" END. With the resulting view, I am able to view number of duplicates if I click on each ID label.



      For example, ID #28347 shows three points that contain 7 elements in total. Ideally, I would like to have a bar chart plotting IDs vs number of duplicates. However, if not possible I would like to show the number of duplicates (7 elements) in the view and maybe sort the view according to this number in a descending order.

      In a second workbook, I managed to obtain the number of duplicates by replicating the first workbook using a text table and grand totals. Still, it is not what I am looking for as an end result.



      Thank you very much in advance.

        • 1. Re: Duplicates Filters and labels
          Tom W

          Hi Sandra,

          You'll need to upload a Tableau Packaged Workbook based on your real data or sample data to replicate the scenario.

          • 2. Re: Duplicates Filters and labels
            Simon Runc

            hi Sandra,


            Thanks for posting a workbook...make finding you a solution much easier!


            So the issue you have here is that you SUM([Number of Records]) > 1 check is an aggregate calculation so only works when you have both Time and ID in you VizLoD...you may find this post helpful Answer - Quora


            To get round this we can use FIXED LoD expression, so we calculate the SUM([number of records]) at the Time/ID level, and then we can use this field in the Viz.


            So I created the following calculation

            [Duplicate Count]

            IF {FIXED [Mtc],[Fechahora]: SUM([Number of Records])} > 1 THEN 1 ELSE 0 END


            I then bring this into the Viz as a SUM and (I think!) we get the result you want.


            Hope this solves your issue and makes sense, but if not please post back

            1 of 1 people found this helpful