topic Re: Parent Table getting filtered with measure filter context in DAX Commands and Tips
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Parent-Table-getting-filtered-with-measure-filter-context/m-p/873856#M7285
<P>Actually I got it resolved by allowing blank values in the table.</P>Thu, 12 Dec 2019 20:05:48 GMTadris-misra2019-12-12T20:05:48ZParent Table getting filtered with measure filter context
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Parent-Table-getting-filtered-with-measure-filter-context/m-p/873774#M7283
<P>Hi Folks - I am facing a filtering problem, might be a simple fix but sorry about my ignorance. </P><P>I have a parent table like </P><TABLE><TBODY><TR><TD>ParentId</TD><TD>ParentName</TD><TD>Sprint</TD></TR><TR><TD>1</TD><TD>ABC</TD><TD>S1</TD></TR><TR><TD>1</TD><TD>ABC</TD><TD>S2</TD></TR><TR><TD>1</TD><TD>ABC</TD><TD>S3</TD></TR><TR><TD>1</TD><TD>ABC</TD><TD>S4</TD></TR><TR><TD>2</TD><TD>XYZ</TD><TD>S1</TD></TR><TR><TD>2</TD><TD>XYZ</TD><TD>S2</TD></TR><TR><TD>3</TD><TD>ASD</TD><TD>S3</TD></TR><TR><TD>4</TD><TD>DFG</TD><TD>S2</TD></TR><TR><TD>4</TD><TD>DFG</TD><TD>S3</TD></TR><TR><TD>5</TD><TD>ZXC</TD><TD>S4</TD></TR></TBODY></TABLE><P> </P><P>Child table like </P><TABLE><TBODY><TR><TD>ChildId</TD><TD>ChildName</TD><TD>ParentID</TD><TD>Status</TD></TR><TR><TD>101</TD><TD>poi</TD><TD>1</TD><TD>InProgress</TD></TR><TR><TD>102</TD><TD>lkj</TD><TD>1</TD><TD>BackLog</TD></TR><TR><TD>201</TD><TD>mnb</TD><TD>2</TD><TD>Done</TD></TR><TR><TD>202</TD><TD>mkl</TD><TD>2</TD><TD>InProgress</TD></TR><TR><TD>203</TD><TD>lop</TD><TD>2</TD><TD>BackLog</TD></TR><TR><TD>301</TD><TD>pol</TD><TD>3</TD><TD>Done</TD></TR><TR><TD>401</TD><TD>ikj</TD><TD>4</TD><TD>InProgress</TD></TR><TR><TD>402</TD><TD>jhy</TD><TD>4</TD><TD>Done</TD></TR><TR><TD>403</TD><TD>gtr</TD><TD>4</TD><TD>Done</TD></TR><TR><TD>404</TD><TD>dfg</TD><TD>4</TD><TD>BackLog</TD></TR></TBODY></TABLE><P> </P><P>I need to see the completion % of each parent based on the child status. So for eample</P><P>1. if parent has 3 children and one of them is "Done" then completion % is 33%[For example parent id 2].</P><P>2. If parent has no child then completion % should come Blank for the parent [For example: Parent ID 5].</P><P>3. If all the child(ern) are done then it should be 100% [For Example Parent ID 3]</P><P>4. If non of the children are done then it should be 0% [For example Parent ID 1]</P><P> </P><P>But when I am calculation in Power BI with measure </P><DIV><DIV><SPAN>Completion % = DIVIDE(CALCULATE(COUNT(ChildTask[ChildId]), ChildTask[Status]="Done"), CALCULATE(COUNT(ChildTask[ChildId])), 0)</SPAN></DIV><DIV><SPAN>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. </SPAN></DIV><DIV><DIV class="mceNonEditable lia-copypaste-placeholder"> </DIV><TABLE><TBODY><TR><TD>ParentId</TD><TD>ParentName</TD><TD>Completion %</TD></TR><TR><TD>2</TD><TD>XYZ</TD><TD>33%</TD></TR><TR><TD>3</TD><TD>ASD</TD><TD>100%</TD></TR><TR><TD>4</TD><TD>DFG</TD><TD>50%</TD></TR></TBODY></TABLE><P> </P><P>Please help with this. PBIX is here <A title="Parent Child Filter" href="https://confizpk-my.sharepoint.com/:f:/g/personal/adris_misra_confiz_com/EkDKDf_hJ_BFrLhU-aH15sYBTPjyP6An0hMusBt_mtzOyQ" target="_blank" rel="noopener">Code</A> </P></DIV></DIV>Thu, 12 Dec 2019 18:45:38 GMThttps://community.powerbi.com/t5/DAX-Commands-and-Tips/Parent-Table-getting-filtered-with-measure-filter-context/m-p/873774#M7283adris-misra2019-12-12T18:45:38ZRe: Parent Table getting filtered with measure filter context
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Parent-Table-getting-filtered-with-measure-filter-context/m-p/873856#M7285
<P>Actually I got it resolved by allowing blank values in the table.</P>Thu, 12 Dec 2019 20:05:48 GMThttps://community.powerbi.com/t5/DAX-Commands-and-Tips/Parent-Table-getting-filtered-with-measure-filter-context/m-p/873856#M7285adris-misra2019-12-12T20:05:48Z