Forum Discussion
datawiz23
2 years agoFrequent Visitor
Rank DAX problem in Power BI
This problem has been sending me potty. I know it should be relatively be simple but I can't crack it, originally I tried to solve it using RANKX but I couldn't get it to work so I tried RANK and...
- 2 years ago
datawiz23
Create the following measure to rank by Rating under each Country:Uni Rank = VAR __T = ALLSELECTED( 'Table' ) VAR __Result = RANK( DENSE, __T , ORDERBY('Table'[World Rank in Year],ASC),, PARTITIONBY( 'Table'[country]) ) RETURN __ResultFile attached below
datawiz23
2 years agoFrequent Visitor
sorry for the delay Fowmy
here is some data from the model
| year | country | University | World Rank in Year |
| 2023 | Albania | Polytechnic University of Tirana | 100036.8 |
| 2019 | Algeria | Badji Mokhtar University – Annaba | 1023 |
| 2022 | Algeria | Badji Mokhtar University – Annaba | 1234 |
| 2023 | Algeria | Badji Mokhtar University – Annaba | 1528 |
| 2021 | Algeria | Blida 1 University | 1066 |
| 2022 | Algeria | Blida 1 University | 1251 |
| 2023 | Algeria | Blida 1 University | 1541 |
| 2023 | Algeria | École Nationale Polytechnique | 100013.7 |
| 2023 | Algeria | École Polytechnique d’Architecture et d’Urbanisme | 100013.8 |
| 2019 | Algeria | Ferhat Abbas Sétif University 1 | 871 |
| 2020 | Algeria | Ferhat Abbas Sétif University 1 | 652 |
| 2021 | Algeria | Ferhat Abbas Sétif University 1 | 527 |
| 2022 | Algeria | Ferhat Abbas Sétif University 1 | 536 |
| 2023 | Algeria | Ferhat Abbas Sétif University 1 | 426 |
kind regards,
Mark