Last active
October 4, 2022 08:15
-
-
Save PBI-DataVizzle/c6d8ff0c62c399c47f18507d492bf868 to your computer and use it in GitHub Desktop.
25 Days of DAX Fridays - Day1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Day1 Answer = | |
| var _result = | |
| MAXX( | |
| TOPN( 1, // return top 1 | |
| VALUES( tournaments_standings[team_name] ), // iterate over tournaments_standings table | |
| CALCULATE( | |
| COUNTROWS( tournaments_standings ), // count all rows in table | |
| tournaments_standings[position] = 1 // where position is first place | |
| ) , | |
| DESC // sort descending | |
| ) , | |
| [team_name] // return the max value of the [tean_name] column | |
| ) | |
| RETURN | |
| _result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment