Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Dax Lovers,
I need some help 😊
I would like to calculate a rate of progress in relation to an objective, but this rate must be capped at 100%.
Example of what I currently have:
Name | Goal | Achieved | Remaining | Achievement |
A | 80 | 86 | -6 | 108% |
B | 40 | 36 | 4 | 90% |
C | 50 | 52 | -2 | 104% |
D | 20 | 18 | 2 | 90% |
Here is what I would like:
Name | Goal | Achieved | Remaining | Achievement |
A | 80 | 86 | 0 | 100% |
B | 40 | 36 | 4 | 90% |
C | 50 | 52 | 0 | 100% |
D | 20 | 18 | 2 | 90% |
I tried the below formula :
But when I put the measure in a table or matrix, it loads endlessly... (I also tried without variables).
Do you have any idea of what's wrong ? All of my other measures are really fast so I don't think it is a model issue.
In addition, to calculate the "Remaining" I'd like to have 0 if the achieved is greater than the goal but using "if is greater than ... then ..." either I lose my total, or the measure is very long when loading.
Many thanks in advance for your help !
Pauline
Solved! Go to Solution.
// If such measures do not work blazingly fast,
// then you have a problem in your model. 100%.
[Capped Achievement] = MIN( 1, DIVIDE( [Achieved], [Goal] ) )
[Surplus] = MAX( 0, [Achieved] - [Goal] )
// If such measures do not work blazingly fast,
// then you have a problem in your model. 100%.
[Capped Achievement] = MIN( 1, DIVIDE( [Achieved], [Goal] ) )
[Surplus] = MAX( 0, [Achieved] - [Goal] )
@daxer-almighty can you explain to me what the cap achievement measure is doing? I just tried it for my need and its working.
Can you try:
Assuming Acheived and Goal are measures. If not then create them as Measures with SUM function.
A correction:
Add a new calculated column for Acheivement
then use this calculated column instead of original column as below:
No need for IF else.
@DIACHROMA Very strange in terms of you having a performance issue with that measure. However, perhaps simply take the approach of taking what you currently have and adding an IF statement. IF %achievement > 1, 1, %achievement. Assuming you have that in a VAR.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |