Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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 !
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |