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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors