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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi - I am struggling to create in DAX what should be a simple measure that will take the following sample "raw" data and return the outcome underneath.
My aspiration is, for each employee, and against each competence, show the Max value for
1) Requirement and
2) Attained,
- and then also return a calculated difference between Requirement and Attained.
Any help gratefully received
Data sample:
| Employee Number | Competence Cat | Requirement | Attained |
| 12345 | 1 | 3 | 0 |
| 12345 | 1 | 0 | 4 |
| 12345 | 10 | 3 | 0 |
| 12345 | 10 | 0 | 2 |
| 54321 | 2 | 3 | 0 |
| 54321 | 2 | 0 | 3 |
| 54321 | 11 | 2 | 0 |
| 54321 | 11 | 0 | 0 |
| 54321 | 11 | 0 | 3 |
Outcome sought
| Employee Number | Competence Cat | Requirement | Attained | Competence Gap |
| 12345 | 1 | 3 | 4 | 1 |
| 12345 | 10 | 3 | 2 | -1 |
| 54321 | 2 | 3 | 3 | 0 |
| 54321 | 11 | 2 | 3 | 1 |
Solved! Go to Solution.
You can do this with three measures.
Max Requirement =
MAX ( 'Table'[Requirement] )
Max Attained =
MAX ( 'Table'[Attained] )
Competence Gap =
[Max Attained] - [Max Requirement]
You can do this with three measures.
Max Requirement =
MAX ( 'Table'[Requirement] )
Max Attained =
MAX ( 'Table'[Attained] )
Competence Gap =
[Max Attained] - [Max Requirement]
Thank you, worked fine- appreciated !
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 51 | |
| 36 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |