Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
Sorry it might be an easy question, but I haven't found a quick solution for that.
If I have a list of students
+--------+----+
| Tom | 62 |
+--------+----+
| Chad | 97 |
+--------+----+
| Sherry | 53 |
+--------+----+
| Jim | 72 |
+--------+----+
| Kate | 89 |
+--------+----+
| Smith | 66 |
+--------+----+
And I have a ranking table
+-----+-----+------+
| Min | Max | Rank |
+-----+-----+------+
| 0 | 60 | F |
+-----+-----+------+
| 60 | 80 | C |
+-----+-----+------+
| 80 | 90 | B |
+-----+-----+------+
| 90 | 100 | A |
+-----+-----+------+
Is there an easy way in DAX to match the score to rank?
Thanks in advance!
Solved! Go to Solution.
@Anonymous This is a good question. It is very possible, let me know if you think the solution is easy or not.
Here is my blog post explaining how to do what you're asking, which is basically an approximate lookup in DAX.
https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
Just replace the bonus amounts in my example with the scores in your data. Let me know if you have any trouble implementing.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous This is a good question. It is very possible, let me know if you think the solution is easy or not.
Here is my blog post explaining how to do what you're asking, which is basically an approximate lookup in DAX.
https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
Just replace the bonus amounts in my example with the scores in your data. Let me know if you have any trouble implementing.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Thank you. Glad you have an almost exact same use case
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |