<?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 Re: Can't filter a calculated table to get children from selected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232973#M167409</link>
    <description>&lt;P&gt;Thanks for your prompt response. I'm applying drill-through. This should update the results of DAX expressions correct?&lt;BR /&gt;I'm testing with a direct filter in the page, and even if I have the correct Id for the parent, the ChildrenPlans table is not being correctly filtered and I have no idea why.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 06:09:56 GMT</pubDate>
    <dc:creator>RENEALVAREZM</dc:creator>
    <dc:date>2024-10-08T06:09:56Z</dc:date>
    <item>
      <title>Can't filter a calculated table to get children from selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232370#M167383</link>
      <description>&lt;P&gt;Hello everyone and apologies if this has been answered before. I cannot find any answer.&lt;/P&gt;&lt;P&gt;This is my scenario:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;BR /&gt;&lt;P&gt;Plans table contains the following important columns for the scenario: [Plan] (the name of the plan), [PlanType] (the type of plan, which can be Portfolio, Program, Project, Epic, or Standalone Project), [Id] (the unique identifier of the plan), [Parent] (the identifier of the parent plan), [Plan Path] (a calculated column using the PATH function to show the access path of a plan in the parent/child relationship), [Plan Level] (the level of the plan in the path using the PATHLENGTH function), [Level 1] (a calculated column using the PATHITEM function corresponding to the top level of the plan hierarchy), [Level 2] (a calculated column using the PATHITEM function corresponding to the Portfolio level), [Level 3] (a calculated column using the PATHITEM function corresponding to the Program or Standalone Project level), [Level 4] (a calculated column using the PATHITEM function corresponding to the Project or Epic level).&lt;BR /&gt;&lt;BR /&gt;What I need to do is to be able to select a value from that table, and then calculate the child plans when selecting a Portfolio or Program.&lt;BR /&gt;&lt;BR /&gt;I have tried different calculated tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This one gives me an empty table:&lt;/P&gt;&lt;P&gt;Child Plans =&lt;BR /&gt;VAR _selectdplan = SELECTEDVALUE(Plans[Id])&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL(Plans),&lt;BR /&gt;PATHCONTAINS(Plans[Plan Path],_selectdplan)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This one gives me the parent instead of children:&lt;/P&gt;&lt;PRE&gt;ChildrenPlans =
VAR plan = SELECTEDVALUE(Plans[Id])
RETURN
CALCULATETABLE(
    Plans,
    Plans[Parent] = plan
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I hardcode one value to test like this, it gives me the rows I need:&lt;BR /&gt;ChildrenPlans =&lt;/P&gt;&lt;P&gt;VAR plan = SELECTEDVALUE(Plans[Id])&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;CALCULATETABLE( Plans, Plans[Parent] = "f8e991a3-74b9-4d43-b8c8-80dbaee72ea0" )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm obviously doing something wrong but can't figure out why.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Oct 2024 18:38:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232370#M167383</guid>
      <dc:creator>RENEALVAREZM</dc:creator>
      <dc:date>2024-10-07T18:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can't filter a calculated table to get children from selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232478#M167391</link>
      <description>&lt;P&gt;"What I need to do is to be able to select a value from that table, and then calculate the child plans when selecting a Portfolio or Program." -&amp;nbsp; How are you selecting these values? If these values are from slicers or visuals, you're on the wrong track because you're creating tables with FILTER and CALCULATETABLE (These are created at refresh time and don't respond to slicers or visuals)&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 21:20:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232478#M167391</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2024-10-07T21:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't filter a calculated table to get children from selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232973#M167409</link>
      <description>&lt;P&gt;Thanks for your prompt response. I'm applying drill-through. This should update the results of DAX expressions correct?&lt;BR /&gt;I'm testing with a direct filter in the page, and even if I have the correct Id for the parent, the ChildrenPlans table is not being correctly filtered and I have no idea why.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 06:09:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4232973#M167409</guid>
      <dc:creator>RENEALVAREZM</dc:creator>
      <dc:date>2024-10-08T06:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can't filter a calculated table to get children from selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4260282#M168834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179293" data-lia-user-login="RENEALVAREZM" class="lia-mention lia-mention-user"&gt;RENEALVAREZM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Here I agree with &lt;SPAN class=""&gt;HotChilli.&lt;/SPAN&gt;&amp;nbsp;According to your statement, I think you are creating a calculated table.&lt;/P&gt;
&lt;P&gt;As far as I know, the calculated table or calculated column will not be dynamic based on slicer.&lt;/P&gt;
&lt;P&gt;Here you use max function in your calculated table code, so it will always return the value with max id.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I suggest you to try measure. Measure will return&amp;nbsp;aggregation value which could be dynamic based on slicer.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/" target="_blank" rel="noopener"&gt;Calculated Columns and Measures in DAX - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 09:30:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-filter-a-calculated-table-to-get-children-from-selected/m-p/4260282#M168834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-28T09:30:32Z</dc:date>
    </item>
  </channel>
</rss>

