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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
So I need help with calculation.
Table has many columns. One of them is order number (one number is repeted but has different data). Just example:
| Order NR | Client | Price |
| 214 | a | 30 |
| 214 | b | 10 |
| 215 | c | 20 |
| 216 | d | 10 |
| 216 | e | 40 |
Average price = 22
Average price for Order nr = (30+10)+20+(10+40) / 3 =36.6
Price is a calculated column.
I need to know what is the average Price for the ORDER NUMBER
Thanks for help
Aleks
Solved! Go to Solution.
Try
Avg Price per order number =
AVERAGEX (
ADDCOLUMNS (
VALUES ( 'Table'[Order number] ),
"@val", CALCULATE ( SUM ( 'Table'[Price] ) )
),
[@val]
)
Hi @Anonymous ,
Here are the steps you can follow:
Measure:
Measure =
var _sum=SUMX(ALL('Table'),[Price])
var _count=CALCULATE(DISTINCTCOUNT('Table'[Order NR]),ALL('Table'))
return
DIVIDE(_sum,_count)
Calculated column:
Column =
var _sum=SUMX(ALL('Table'),[Price])
var _count=DISTINCTCOUNT('Table'[Order NR])
return
DIVIDE(_sum,_count)
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
Measure:
Measure =
var _sum=SUMX(ALL('Table'),[Price])
var _count=CALCULATE(DISTINCTCOUNT('Table'[Order NR]),ALL('Table'))
return
DIVIDE(_sum,_count)
Calculated column:
Column =
var _sum=SUMX(ALL('Table'),[Price])
var _count=DISTINCTCOUNT('Table'[Order NR])
return
DIVIDE(_sum,_count)
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Try
Avg Price per order number =
AVERAGEX (
ADDCOLUMNS (
VALUES ( 'Table'[Order number] ),
"@val", CALCULATE ( SUM ( 'Table'[Price] ) )
),
[@val]
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 53 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |