Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |