Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors