Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
AnkitKukreja
Super User
Super User

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.

 

DateStageGamesResult
02-06-1991FIN1L
05-06-1991FIN2W
07-06-1991FIN3W
09-06-1991FIN4W
12-06-1991FIN5W
03-06-1992FIN1W
05-06-1992FIN2L
07-06-1992FIN3W
10-06-1992FIN4L
12-06-1992FIN5W
14-06-1992FIN6W
09-06-1993FIN1W
11-06-1993FIN2W
13-06-1993FIN3L
16-06-1993FIN4W
18-06-1993FIN5L
20-06-1993FIN6W
05-06-1996FIN1W
07-06-1996FIN2W
09-06-1996FIN3W
12-06-1996FIN4L
14-06-1996FIN5L
16-06-1996FIN6W
01-06-1997FIN1W
04-06-1997FIN2W
06-06-1997FIN3L
08-06-1997FIN4L
11-06-1997FIN5W
13-06-1997FIN6W
03-06-1998FIN1L
05-06-1998FIN2W
07-06-1998FIN3W
10-06-1998FIN4W
12-06-1998FIN5L
14-06-1998FIN6W

 

Thanks,

Ankit

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
https://topmate.io/ankit_kukreja
1 ACCEPTED SOLUTION
jameszhang0805
Resolver IV
Resolver 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 )

 

 

jameszhang0805_4-1615609005620.png

 

View solution in original post

1 REPLY 1
jameszhang0805
Resolver IV
Resolver 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 )

 

 

jameszhang0805_4-1615609005620.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.