Forum Discussion
Struggling with RANKX
- 5 years ago
rogerdea
I checked the file, you need to insert the location and the location group from the areas table to the visual:You can download the file: HERE
Location Rank = RANKX( ALLSELECTED(Areas[Location]), CALCULATE(SUM(Scores[Score])) ) -------------------------------------------------------- Overall Rank = RANKX( ALLSELECTED(Areas[Location],Areas[Location_Group]), CALCULATE(SUM(Scores[Score])) )________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
rogerdea
What is the relationship between the tables? Can you share a dummy PBIX file that represents your actual model?
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
Thanks very much here's a link to the pbx example im using:
https://drive.google.com/file/d/1wSKbEPxO0IUNLF6Cr_IJH8uimJUUNwN1/view?usp=sharing
You can see i only have one of your DAX examples working but theres repeating locations as well which i dont want.
Also what would be amazing is for these rankings to be able to recalculate whenever the filter (or any other i add in) are applied.
- Fowmy5 years agoSuper User
rogerdea
I checked the file, you need to insert the location and the location group from the areas table to the visual:You can download the file: HERE
Location Rank = RANKX( ALLSELECTED(Areas[Location]), CALCULATE(SUM(Scores[Score])) ) -------------------------------------------------------- Overall Rank = RANKX( ALLSELECTED(Areas[Location],Areas[Location_Group]), CALCULATE(SUM(Scores[Score])) )________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂