Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Reply
pover
Partner - Master
Partner - Master

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