Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello everyone.
I have been trying to subtract values from a table with a fixed measurement (first in the ranking, second, third ...), but I can't.
I would like to know if any of you can help me.
Solved! Go to Solution.
@davorgom if you want to compare with 6th position, This should be calculated column, not measure
Compare 6th Position =
var _sub=FILTER('Table','Table'[Position]=6)
var _2max=MAXX(_sub,[Distance])
var result= _2max-'Table'[Distance]
return result
This should be calculated column, not measure.
Can you provide your original data, so that i can test it.
Also I have modified my reply a little bit. Please try again.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
| Position | Distance |
| 1 | 10.5 |
| 2 | 10.3 |
| 3 | 9 |
| 4 | 7 |
| 5 | 6 |
| 6 | 5 |
Create two calculated columns.
Compare 1st Position =
var _1max=MAX('Table'[Distance])
var result= _1max-'Table'[Distance]
return resultCompare 2nd Position =
var _sub=FILTER('Table','Table'[Position] = 2)
var _2max=MAXX(_sub,[Distance])
var result= _2max-'Table'[Distance]
return result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
I appreciate your answer. I wanted to tell you that when I copied and pasted the DAX formula, I get an error in the penultimate line. Do you know why it could be?
On the other hand, I saw the two measurements, and they only differ from each other using MAX and MAXX. If I wanted to compare the value of the 6th position with the rest of the results, what should I change?
I appreciate your time and knowledge.
Blessings from Colombia
@davorgom if you want to compare with 6th position, This should be calculated column, not measure
Compare 6th Position =
var _sub=FILTER('Table','Table'[Position]=6)
var _2max=MAXX(_sub,[Distance])
var result= _2max-'Table'[Distance]
return result
This should be calculated column, not measure.
Can you provide your original data, so that i can test it.
Also I have modified my reply a little bit. Please try again.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 30 | |
| 19 | |
| 12 | |
| 11 |