Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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 !
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |