
Contributor III
2019-11-27
09:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
KPI - Sucessive Victories
Hi.
I Want to create a KPI which could count the greatest winning streak (for example: 6 victories).
For that i have the field Game Number (1, 2, 3, 4... 189) , and the Result (Victory or Deafeat).
Any ideas?
Thanks
471 Views
1 Reply

Partner - Master
2019-11-27
10:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
A streak means here, the amount of consecutive wins rights?
Try this in the script. It's about the IF function.
Table:
Load
*,
IF(Score = 'Win' and Previous(Score) = Score, peek(_cntWins) +1,1) as _cntWins;
Load * Inline [
Game, Score
1, Win
2, Loss
3, Win
4, Win
5, Win
6, Win
7, Loss
8, Loss
9, Loss
10, Win
11, Win
12, Win
];
Put in the KPI object:
Max(_cntWins)
Jordy
Climber
Work smarter, not harder
450 Views
