cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adris-misra
Frequent Visitor

Parent Table getting filtered with measure filter context

Hi Folks - I am facing a filtering problem, might be a simple fix but sorry about my ignorance. 

I have a parent table like 

ParentIdParentNameSprint
1ABCS1
1ABCS2
1ABCS3
1ABCS4
2XYZS1
2XYZS2
3ASDS3
4DFGS2
4DFGS3
5ZXCS4

 

Child table like 

ChildIdChildNameParentIDStatus
101poi1InProgress
102lkj1BackLog
201mnb2Done
202mkl2InProgress
203lop2BackLog
301pol3Done
401ikj4InProgress
402jhy4Done
403gtr4Done
404dfg4BackLog

 

I need to see the completion % of each parent based on the child status. So for eample

1. if parent has 3 children and one of them is "Done" then completion % is 33%[For example parent id 2].

2. If parent has no child then completion % should come Blank for the parent [For example: Parent ID 5].

3. If all the child(ern) are done then it should be 100% [For Example Parent ID 3]

4. If non of the children are done then it should be 0% [For example Parent ID 1]

 

But when I am calculation in Power BI with measure 

Completion % = DIVIDE(CALCULATE(COUNT(ChildTask[ChildId]), ChildTask[Status]="Done"), CALCULATE(COUNT(ChildTask[ChildId])), 0)
and bringing it to a table like Completion Status I am only getting the below parents, for which there is at least one "Done" child. Parent 1 and 5 are completely ignored. 
 
ParentIdParentNameCompletion %
2XYZ33%
3ASD100%
4DFG50%

 

Please help with this. PBIX is here Code 

1 ACCEPTED SOLUTION
adris-misra
Frequent Visitor

Actually I got it resolved by allowing blank values in the table.

View solution in original post

1 REPLY 1
adris-misra
Frequent Visitor

Actually I got it resolved by allowing blank values in the table.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors