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!
Hi all.
So I have the following 3 columns in my table: Name, QTR 1, QTR 2. QTR 1 and 2 are calculated columns that I made to get the difference from other columns.
It's important to note that there might be multiple row entries for the same name as shown above.
So what I'm trying to do is to get the total average in QTR 1 for each name. For example, for Red under QTR 1, the sum would be 17 and so the result should display the average which is 5.66. This would repeat in QTR 2, so the average for Red would be 3 there.
Finally, the end result should add the two averages together from both columns, so in the case of Red, it would add 5.66 and 3 to return 8.66
I wrote the DAX below but keep running into an error that says something about "function groupby scalar expressions have to be aggregation."
Not sure how to figure this out. Any help is appreciated!
Total Average by Name = AVERAGEX(GROUPBY('Table', 'Table'[Name], "TotalValue", (AVERAGE('Table'[QTR1]) + AVERAGE('Table'[QTR2]))), [TotalValue])
Hi @pintobean87
Try the following measure
Measure = var a=CALCULATE(AVERAGE('Table'[QTR1]),ALLEXCEPT('Table','Table'[Name]))
var b=CALCULATE(AVERAGE('Table'[QTR2]),ALLEXCEPT('Table','Table'[Name]))
return a+b
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Or is there just an easier way to do the math than what I'm trying to do?
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 |
|---|---|
| 59 | |
| 59 | |
| 45 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 115 | |
| 112 | |
| 38 | |
| 35 | |
| 26 |