2 Replies Latest reply on Aug 22, 2016 4:51 PM by Patrick A Van Der Hyde

    Manipulate INDEX() via Duplicate Entries (or other means)

    savas.ziplies

      Hi everyone

       

      Based on Re: Running distinct count over grouped IDs  I am working on an increasing and decreasing walk and I hope somebody can help me with my current issue.

       

      I have the following scenario:

      Start01.04. (ADD)31.05. (REMOVE)
      01.07. (ADD)End
      14144
      25255
      333
      6666
      77

       

      So, what I have is a start and end amount of IDs. IDs are added or subtracted over time.

      IDs that are already in the Start amount should not be added (counted). In the example above 6 at the 01.04.

      IDs that are already in the End amount should not be subtracted (counted). In the example above 3 at the 31.05.

       

      Now, I have an INDEX() running over the IDs. Duplicate IDs are increased. So, for example 1 and 2 at the 31.05. have the INDEX()=2 because they are in the start.

       

      As I don't know any way to look ahead and back at the same time, I thought, I would just duplicate all IDs from the End, that are also in the Start (in the example 3, 6 and 7) and that the INDEX() would automatically increase to 3 and above accordingly. But Tableau seems to ignore the duplicates on the partition of the ID and just continues to count normally, so that I am stuck with INDEX()=2 where I would like to see 3 or above. I would like to alter the Window Sum accordingly.

       

      Does anybody have any idea how this could be achieved? Many thanks in advance for any help.

       

       

      Thanks and Cheers