Forum Discussion
Count Final Wins
Hi All,
I want to count the wins from the dataset below. The stage Fin refers to finals and there are 7 games in each final, so the games 1-5 in 1991 finals and 1-6 in 1992 is final games for that period, and I need to find if the team has won more than or equal to 4 times out of those games played. Result gives me the status Win (W) and Loss (L).
So ideally, in 1991 team has lost game 1 and won other 4 games (2-5), so that gives me count 1 and so on.
My stage also consists of other games (Qtrfin, EC1, EC2) as well, but I'm concerned about the Fin stage.
| Date | Stage | Games | Result |
| 02-06-1991 | FIN | 1 | L |
| 05-06-1991 | FIN | 2 | W |
| 07-06-1991 | FIN | 3 | W |
| 09-06-1991 | FIN | 4 | W |
| 12-06-1991 | FIN | 5 | W |
| 03-06-1992 | FIN | 1 | W |
| 05-06-1992 | FIN | 2 | L |
| 07-06-1992 | FIN | 3 | W |
| 10-06-1992 | FIN | 4 | L |
| 12-06-1992 | FIN | 5 | W |
| 14-06-1992 | FIN | 6 | W |
| 09-06-1993 | FIN | 1 | W |
| 11-06-1993 | FIN | 2 | W |
| 13-06-1993 | FIN | 3 | L |
| 16-06-1993 | FIN | 4 | W |
| 18-06-1993 | FIN | 5 | L |
| 20-06-1993 | FIN | 6 | W |
| 05-06-1996 | FIN | 1 | W |
| 07-06-1996 | FIN | 2 | W |
| 09-06-1996 | FIN | 3 | W |
| 12-06-1996 | FIN | 4 | L |
| 14-06-1996 | FIN | 5 | L |
| 16-06-1996 | FIN | 6 | W |
| 01-06-1997 | FIN | 1 | W |
| 04-06-1997 | FIN | 2 | W |
| 06-06-1997 | FIN | 3 | L |
| 08-06-1997 | FIN | 4 | L |
| 11-06-1997 | FIN | 5 | W |
| 13-06-1997 | FIN | 6 | W |
| 03-06-1998 | FIN | 1 | L |
| 05-06-1998 | FIN | 2 | W |
| 07-06-1998 | FIN | 3 | W |
| 10-06-1998 | FIN | 4 | W |
| 12-06-1998 | FIN | 5 | L |
| 14-06-1998 | FIN | 6 | W |
Thanks,
Ankit
Not sure if this is the result you want, but I didn't find the team information in your data source, so I created a calculated column Year for dimension.
#Win = VAR _Table = CALCULATETABLE ( SUMMARIZE ( 'Table', 'Table'[Year], 'Table'[Games], 'Table'[Result] ), 'Table'[Stage] = "FIN", 'Table'[Result] = "W" ) VAR _GROUPBY = GROUPBY ( _Table, 'Table'[Year], "@Win", SUMX ( CURRENTGROUP (), 1 ) ) VAR _Filtered = FILTER ( _GROUPBY, [@Win] >= 4 ) RETURN COUNTROWS ( _Filtered )
1 Reply
- jameszhang0805Resolver IV
Not sure if this is the result you want, but I didn't find the team information in your data source, so I created a calculated column Year for dimension.
#Win = VAR _Table = CALCULATETABLE ( SUMMARIZE ( 'Table', 'Table'[Year], 'Table'[Games], 'Table'[Result] ), 'Table'[Stage] = "FIN", 'Table'[Result] = "W" ) VAR _GROUPBY = GROUPBY ( _Table, 'Table'[Year], "@Win", SUMX ( CURRENTGROUP (), 1 ) ) VAR _Filtered = FILTER ( _GROUPBY, [@Win] >= 4 ) RETURN COUNTROWS ( _Filtered )