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!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I have this similar dataset:
| Id | Task | Progress | Id Main task |
| 1 | Main task 1 | ? | |
| 2 | Sub task 1 | 55 | 1 |
| 3 | Sub task 2 | 20 | 1 |
| 4 | Main task 2 | ? | |
| 5 | Sub task 1 | 10 | 4 |
| 6 | Sub task 2 | 0 | 4 |
| 7 | Sub task 3 | 95 | 4 |
| 8 | Main task 3 | ? | |
| 9 | Sub task 1 | 50 | 8 |
Intention is to find the average progress based on the sub tasks in each main task.
My start is: IF(Id main task = BLANK(), ??? Then I need to select all rows with id main task = Id and average these.
How to?
Thanks
Solved! Go to Solution.
Hello, @Peavey
Try something like this:
Average progress =
var currentId = SELECTEDVALUE('Table'[Id])
var averageSubtasks = AVERAGEX(FILTER(ALL('Table'), 'Table'[ Id Main task] = currentId), 'Table'[ Progress])
return averageSubtasks
Thanks for all the help, I found @vojtechsima solution to fit my needs very well!
This community is so impressive, so much knowledge and helpful people here, many thanks again!
-A-
Hi @Peavey ,
You can try formula like below to create calculate column and measure:
SubTaskProgress = IF(NOT(ISBLANK([Id Main task])), [Progress], BLANK())
AverageProgress =
CALCULATE(
AVERAGE([SubTaskProgress]),
ALLEXCEPT(TableName, TableName[Id Main task])
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
what's the expected output based on the sample data you provided?
Proud to be a Super User!
Hello, @Peavey
Try something like this:
Average progress =
var currentId = SELECTEDVALUE('Table'[Id])
var averageSubtasks = AVERAGEX(FILTER(ALL('Table'), 'Table'[ Id Main task] = currentId), 'Table'[ Progress])
return averageSubtasks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!