4 Replies Latest reply on Nov 13, 2016 1:41 PM by Marc MOUSSA

    ID and Rank Duplicate cases

    Robin Weber


      I work with criminal court data and am new to Tableau and its calculated fields.  I'm coming from an SPSS background.

      I'm trying to create a calculated field that flags the most serious charge on a docket.  In the attached workbook offense level 1= felony and 2= misdemeanor. (felony is more serious).  The Rank ranks the crime with the higher the number, the more serious the crime.  In the first docket- 123456, I would want the felony assault flagged, in the second docket 223456- either felony assault could be flagged.


      SPSS had an ID duplicate function where I would instruct it to find the duplicate docket number, sort by offenses level ascending and  rank descending and then it would flag with a 1 the first count that met that criteria. If a docket only had one count, that count would be flagged.  The flagging was 1/0 scheme. 


      Thanks in advance,