This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello everybody,
i´m struggeling with a average calculation in my power bi report. Target what i would like to achieve is, to calculate the
My Table "PLANTS" structure looks following:
| Plant Code | Plant Material | MRP Controller | Attribut | Amount | |||||
| 8401 | 2402000508 | 600 | Req./Day | 34,1 | |||||
| 8401 | 2402000508 | 600 | Actual Range | 16,6 |
| ||||
| 8401 | 2402000508 | 600 | Stock | 200 |
| ||||
| 7601 | 494600125 | 500 | Req./Day | 10 | |||||
| 7601 | 4946000125 | 500 | Actual Range | 3 | |||||
| 7601 | 4946000125 | 500 | Stock | 3000 |
The calculation what i did was following:
1. I created a SUM Measure with following Code:
SUM Plants =
@tobisw , This formula, will avg above 'Plants'[MRP Contr.] level
AVERAGEX(
KEEPFILTERS(VALUES('Plants'[MRP Contr.])),
CALCULATE([Actual_range])
)
or
AVERAGEX(
VALUES('Plants'[MRP Contr.]),
CALCULATE([Actual_range])
)
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
You mean, that my formula is not correct? Sorry, i´m not sure if i understood your right. By using your formula the result is the same...
Hi @tobisw ,
I have a test by your code. And get result as below.
I think the average of "Acutal_range" in each [MPR Controller] is correct.
For [MPR Controller] = 500, average of "Acutal_range" = 3/1
For [MPR Controller] = 600, average of "Acutal_range" = 166/1
Subtotal = (3+166)/2
Could you show a screenshot with the result you want to me?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 25 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 28 | |
| 23 | |
| 23 |