Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Hi Everyone, thanks in advance for your kind support.
I'm fairly new to PBI, and trying to figure out the following:
- working with NBA statistics for Michael Jordan, I want to COUNT the number of titles he has won.
- the data table I have lists all statistics (pts, fg, playoff_stage,game id, w_or_l etc)
- I have created measures to count the total number of games, total W or total L.
- Now I'm stuck in evaluating with a measure or other way how many titles MJ has won (the result if 6 out of 6 participations in NBA finals).
| season id | wins | losses | total games in final | 
| 7 | 4 | 1 | 5 | 
| 8 | 4 | 2 | 6 | 
| 9 | 4 | 2 | 6 | 
| 11 | 4 | 2 | 6 | 
| 12 | 4 | 2 | 6 | 
| 13 | 4 | 2 | 6 | 
The above is thre resulting visual matrix created in PBI adding the relevant fields:
Season_id is the nth season MJ played in NBA (values store in a lookup table with relationship to the fact/data table).
Wins, Losses and total games in final, are measures calculated from a data table
e.g. Wins :=
Since we know that 4W = Nba champ, I'd like to count that automatically, as I want to add also statistics for other players and make some comparisons among them.
If I have not made myself clear, I apologise and will try to clarify.
Happy sunday to all of you.
Solved! Go to Solution.
The basic concept would be to iterate over seasons and count when wins = 4.
ChampSeasons =
COUNTROWS (
    FILTER (
        VALUES ( jordan_playoffs[season] ),
        [Wins] = 4
    )
)
 
					
				
		
Thank you Alexis, it was easier than expected. Inserted into my files and checked.
Will review the logic behind the piece of code to reuse it in other events.
The basic concept would be to iterate over seasons and count when wins = 4.
ChampSeasons =
COUNTROWS (
    FILTER (
        VALUES ( jordan_playoffs[season] ),
        [Wins] = 4
    )
)
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 85 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |