1 Reply Latest reply: Dec 27, 2011 4:22 PM by Thomas Ljungström RSS

    streak of consecutive wins

      Hi (again)!

       

      I have a bunch of, hockey, games stored. Who played who, results and some other data.

      Now I'm looking for the best way to show streak of consecutive wins, both longest without selections and longest with two teams selected.

       

      Calculation? Create a supporting table in load script?

      Any suggestions/tips are welcome.

       

      Best regards

      Thomas

        • streak of consecutive wins
          Karl Pover

          Thomas,

           

          My first thought would be to create a table in the script that is ordered by date and then team.  Then I would load it using inter-row functions like previous() or peek() to keep track of a counter that starts over at 0 for each different team and each time that team loses and adds 1 to the previous row each time the team wins.

           

          There might be a fancier way to do it, but that should get the job done.

           

          Karl