<?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 dax hierarchical var table calls - parent &amp;lt; child &amp;lt; child model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3386618#M127612</link>
    <description>&lt;P&gt;Previous post&amp;nbsp; &amp;nbsp;&lt;SPAN class=""&gt;&lt;A title="feeling like I can hardly get out of DAX bed ... let alone crawl to the DAX kitchen" href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-syntax-calculate-table-vs-filter-context-transition-and/td-p/3382072" target="_blank" rel="noopener"&gt;dax syntax - calculate(table) vs filter context transition and return confusion&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN class=""&gt;Solved the&amp;nbsp; parent &amp;lt; child&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt; part&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; Now after extensive searching, how to integrate a tiertiary child call.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Feel like I'm back to the same situation as previous post but different error :}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/*  model  pml &amp;lt; mbm &amp;lt; mbpl  */
EVALUATE 
    VAR pml_id =    -- pml.id = 3921,  pml.id (string)
        CALCULATE (
            MAX ( 'Project Master List'[Id] ),
            'Project Master List'[DIR] = "CO"  &amp;amp;&amp;amp; 
            'Project Master List'[Initiative Name] = "Fleet Business Transformation"
        )

    VAR mbm = 
        CALCULATETABLE (
            'Measure Benefit Master',
            --'Measure Benefit Master'[DIR] = "CO" &amp;amp;&amp;amp;    -- no data integrity :}
            'Measure Benefit Master'[PM IDId] = pml_id   -- both keys are string, 3921
        )

    VAR mbpl = 
        CALCULATETABLE (
            'Measure Benefit Progress List',
            'Measure Benefit Progress List'[Year Reported] = "2021-22"  &amp;amp;&amp;amp;
            'Measure Benefit Progress List'[Main ID LkUpId] = mbm[Id]   -- both keys are string, 439 440 441 442
        )
/*
---  main query  ---
    VAR mbpl_columns = 
        SELECTCOLUMNS (
            'mbpl', 
            "Annual Status",                    'Measure Benefit Progress List'[Annual Status],
            "Annual Status Score",              'Measure Benefit Progress List'[Annual Status Score],
            "Annual Status Traffic Light",      'Measure Benefit Progress List'[Annual Status Traffic Light]
        )
*/
RETURN 
    --ROW ( "pml_id", pml_id )   -- its a return statement so a table of sorts must be returned
    --mbm
    mbpl
    --mbpl_columns
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cannot find table 'mbm' error, but the mbm var declared table is there!?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 06:07:23 GMT</pubDate>
    <dc:creator>garythomannCoGC</dc:creator>
    <dc:date>2023-08-22T06:07:23Z</dc:date>
    <item>
      <title>dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3386618#M127612</link>
      <description>&lt;P&gt;Previous post&amp;nbsp; &amp;nbsp;&lt;SPAN class=""&gt;&lt;A title="feeling like I can hardly get out of DAX bed ... let alone crawl to the DAX kitchen" href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-syntax-calculate-table-vs-filter-context-transition-and/td-p/3382072" target="_blank" rel="noopener"&gt;dax syntax - calculate(table) vs filter context transition and return confusion&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN class=""&gt;Solved the&amp;nbsp; parent &amp;lt; child&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt; part&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; Now after extensive searching, how to integrate a tiertiary child call.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Feel like I'm back to the same situation as previous post but different error :}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/*  model  pml &amp;lt; mbm &amp;lt; mbpl  */
EVALUATE 
    VAR pml_id =    -- pml.id = 3921,  pml.id (string)
        CALCULATE (
            MAX ( 'Project Master List'[Id] ),
            'Project Master List'[DIR] = "CO"  &amp;amp;&amp;amp; 
            'Project Master List'[Initiative Name] = "Fleet Business Transformation"
        )

    VAR mbm = 
        CALCULATETABLE (
            'Measure Benefit Master',
            --'Measure Benefit Master'[DIR] = "CO" &amp;amp;&amp;amp;    -- no data integrity :}
            'Measure Benefit Master'[PM IDId] = pml_id   -- both keys are string, 3921
        )

    VAR mbpl = 
        CALCULATETABLE (
            'Measure Benefit Progress List',
            'Measure Benefit Progress List'[Year Reported] = "2021-22"  &amp;amp;&amp;amp;
            'Measure Benefit Progress List'[Main ID LkUpId] = mbm[Id]   -- both keys are string, 439 440 441 442
        )
/*
---  main query  ---
    VAR mbpl_columns = 
        SELECTCOLUMNS (
            'mbpl', 
            "Annual Status",                    'Measure Benefit Progress List'[Annual Status],
            "Annual Status Score",              'Measure Benefit Progress List'[Annual Status Score],
            "Annual Status Traffic Light",      'Measure Benefit Progress List'[Annual Status Traffic Light]
        )
*/
RETURN 
    --ROW ( "pml_id", pml_id )   -- its a return statement so a table of sorts must be returned
    --mbm
    mbpl
    --mbpl_columns
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cannot find table 'mbm' error, but the mbm var declared table is there!?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 06:07:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3386618#M127612</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-22T06:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3391537#M127853</link>
      <description>&lt;P&gt;Power BI dataset model portion&amp;nbsp; pml &amp;lt; mbm &amp;lt; mbpl&amp;nbsp; parent child child hierarchy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pml &amp;lt; mbm&amp;nbsp; joins&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mbm &amp;lt; mbpl&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 05:33:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3391537#M127853</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-22T05:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3393855#M127992</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;sorry to be a pain but thought to dm as helped previously.&amp;nbsp; I must be doing something brain dead in dax world but still can not figure this out :}&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 03:18:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3393855#M127992</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-23T03:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398074#M128228</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350775" data-lia-user-login="garythomannCoGC" class="lia-mention lia-mention-user"&gt;garythomannCoGC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the code, the immediate cause of the error is that you can't reference a column of a table variable by 'Table Variable Name'[Column Name].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a suggested change with mbm_id_values which retrieves the distinct values of 'Member Benefit Master'[Id]. These are then applied as a filter in mbpl.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/*  model  pml &amp;lt; mbm &amp;lt; mbpl  */
EVALUATE 
    VAR pml_id =    -- pml.id = 3921,  pml.id (string)
        CALCULATE (
            MAX ( 'Project Master List'[Id] ),
            'Project Master List'[DIR] = "CO"  &amp;amp;&amp;amp; 
            'Project Master List'[Initiative Name] = "Fleet Business Transformation"
        )

    VAR mbm_id_values = 
        CALCULATETABLE (
            VALUES ( 'Measure Benefit Master'[Id] ), -- handle single or multiple Id values
            --'Measure Benefit Master'[DIR] = "CO" &amp;amp;&amp;amp;    -- no data integrity :}
            'Measure Benefit Master'[PM IDId] = pml_id   -- both keys are string, 3921
        )

    VAR mbpl = 
        CALCULATETABLE (
            'Measure Benefit Progress List',
            'Measure Benefit Progress List'[Year Reported] = "2021-22"  &amp;amp;&amp;amp;
            'Measure Benefit Progress List'[Main ID LkUpId] IN mbm_id_values -- both keys are string, 439 440 441 442
        )
/*
---  main query  ---
    VAR mbpl_columns = 
        SELECTCOLUMNS (
            'mbpl', 
            "Annual Status",                    'Measure Benefit Progress List'[Annual Status],
            "Annual Status Score",              'Measure Benefit Progress List'[Annual Status Score],
            "Annual Status Traffic Light",      'Measure Benefit Progress List'[Annual Status Traffic Light]
        )
*/
RETURN 
    --ROW ( "pml_id", pml_id )   -- its a return statement so a table of sorts must be returned
    --mbm
    mbpl
    --mbpl_columns&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 00:26:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398074#M128228</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-08-25T00:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398287#M128239</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;thank you yes it does.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I understand, that I needed to setup the array for mbm explicitly.&amp;nbsp; I did try using 'IN' like an sql in-list but ... :}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's funny 'the powers that be' are happy to send folks on training courses but when it comes to IT they think we do it all by magic!&amp;nbsp; I have to revisit the sqlbi.com course I bought and hardly had time for over a year ago.&amp;nbsp; Always hitting things on an as needed basis :}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks once again for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 04:38:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398287#M128239</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-25T04:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398294#M128240</link>
      <description>&lt;P&gt;And 'cool o rama' the next bit works as intended with out further change ...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/*  model  pml &amp;lt; mbm &amp;lt; mbpl  */
EVALUATE 
    VAR pml_id =   -- pml.id = 3921,  pml.id (string)
        CALCULATE (
            MAX ( 'Project Master List'[Id] ),
            'Project Master List'[DIR] = "CO"  &amp;amp;&amp;amp; 
            'Project Master List'[Initiative Name] = "Fleet Business Transformation"
        )

    VAR mbm_id_values = 
        CALCULATETABLE (
            VALUES ( 'Measure Benefit Master'[Id] ), -- handle single or multiple Id values
            --'Measure Benefit Master'[DIR] = "CO" &amp;amp;&amp;amp;    -- no data integrity :}
            'Measure Benefit Master'[PM IDId] = pml_id   -- both keys are string, 3921
        )

    VAR mbpl =   -- mbm.Id == 439 440 441 442
        CALCULATETABLE (
            'Measure Benefit Progress List',
            'Measure Benefit Progress List'[Year Reported] = "2021-22"  &amp;amp;&amp;amp;
            'Measure Benefit Progress List'[Main ID LkUpId] IN mbm_id_values   -- both keys are string, 439 440 441 442
        )

    VAR mbpl_columns = 
        SELECTCOLUMNS (
            'mbpl', 
            "Annual Status",                    'Measure Benefit Progress List'[Annual Status],
            "Annual Status Score",              'Measure Benefit Progress List'[Annual Status Score],
            "Annual Status Traffic Light",      'Measure Benefit Progress List'[Annual Status Traffic Light]
        )

RETURN 
    --ROW ( "pml_id", pml_id )   -- its a return statement so a table of sorts must be returned
    --mbm
    --mbpl
    mbpl_columns

&lt;/LI-CODE&gt;
&lt;P&gt;DaxStudio output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 04:34:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398294#M128240</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-25T04:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: dax hierarchical var table calls - parent &lt; child &lt; child model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398297#M128242</link>
      <description>&lt;P&gt;DaxStudio output of this run for context for others&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 04:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-hierarchical-var-table-calls-parent-lt-child-lt-child-model/m-p/3398297#M128242</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-25T04:36:14Z</dc:date>
    </item>
  </channel>
</rss>

