<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Filter Parent based on child selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2774149#M86501</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an interesting problem I'm trying to set up a visual for and I can't quite get the filter set up correctly. We have a data structure that looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to select any of the child values via a filter but filter the parents that contain that child. So, for example, if I select Child "A" it would apply a filter like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From that I want to create a visual that would look something like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated, thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 17:06:25 GMT</pubDate>
    <dc:creator>rehtdats</dc:creator>
    <dc:date>2022-09-16T17:06:25Z</dc:date>
    <item>
      <title>Filter Parent based on child selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2774149#M86501</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an interesting problem I'm trying to set up a visual for and I can't quite get the filter set up correctly. We have a data structure that looks like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to select any of the child values via a filter but filter the parents that contain that child. So, for example, if I select Child "A" it would apply a filter like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From that I want to create a visual that would look something like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated, thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:06:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2774149#M86501</guid>
      <dc:creator>rehtdats</dc:creator>
      <dc:date>2022-09-16T17:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Parent based on child selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2774181#M86509</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Here is one way to do this:&lt;BR /&gt;&lt;BR /&gt;Data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Dax:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Parent Filter Measure = &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_child&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Child]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Child]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;_child&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Apply the filter measure like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;img /&gt;
&lt;P&gt;For the result table you can utilize similar logic for example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Count child = &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_child&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Child]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Child]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;_child&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:20:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2774181#M86509</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-09-16T17:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Parent based on child selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2778162#M86821</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have sucessfully been able to get the child counts a number of different ways, but I'm still struggling to get that overall parent count along with the "rate" is ultimately what I'm trying to get. No matter how I slice it the parent counts keep aligning with the child counts and all the rates are 100%.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 15:53:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Parent-based-on-child-selection/m-p/2778162#M86821</guid>
      <dc:creator>rehtdats</dc:creator>
      <dc:date>2022-09-19T15:53:03Z</dc:date>
    </item>
  </channel>
</rss>

