<?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: 3 Table Relationships in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4396136#M174533</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="410720" data-lia-user-login="KW123" class="lia-mention lia-mention-user"&gt;KW123&lt;/a&gt;&amp;nbsp;Combine the Senior, Mid, and Entry Employee goals into a single table with an additional column to indicate the employee type (Senior, Mid, Entry). This will act as a bridge table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create relationships between the bridge table and the Employee list table on the employee ID or title.&lt;BR /&gt;Create relationships between the bridge table and the Dates table on the date field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the bridge table in your visualizations instead of the individual goal tables. This will ensure that the slicer works correctly across all employee types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create DAX measures to calculate the MTD goals using the bridge table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MTD Goal = &lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'BridgeTable'[Goal]),&lt;BR /&gt;DATESMTD ( 'Dates'[Date] )&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ensure that the slicer is set to filter by store number and is connected to the Employee list table. This will filter the bridge table through the relationships.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2025 10:21:19 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2025-02-05T10:21:19Z</dc:date>
    <item>
      <title>3 Table Relationships</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4395613#M174521</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am building a report which has the following tables:&lt;BR /&gt;-Dates&lt;BR /&gt;-Senior Employee goals&lt;/P&gt;&lt;P&gt;-Middle Employee goals&lt;BR /&gt;-Entry Employee goals&lt;BR /&gt;-Employee list&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my visualization, I have three tables.&amp;nbsp; One for each type of employee (Senior, Mid, Entry) I have a slicer that will work on all three table visualizations and it slices by store number.&amp;nbsp; I would like the report to only show employees in the store number selected.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I originally had all three goal tables with a relationship to my dates table but in the visualization, it was showing ALL employees ignoring the store number slicer.&amp;nbsp; Each employee row had the correct MTD goal however.&amp;nbsp; If I do not have a MTD measure&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Senior Goals'&lt;/SPAN&gt;&lt;SPAN&gt;[Goal 1]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Dates'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt; &lt;SPAN&gt;FILTERS&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Dates'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;then each employee row only shows the goal not in MTD format.&amp;nbsp; But, the slicer works and it will only show me employees for the selected store.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So I decided to add the Senior employee goal to the employee list (relationship on employee title) and that worked - the visualization only showed the selected store and the goal with my goal MTD measure.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However, when I try to add the Mid and Entry tables to the employee list, it is saying that there is ambiguity....&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My question is this, Is there a way to make that slicer work by store number and date (I need my goal to show as a MTD) or is there a way to have all three goal tables link up to both the dates and the employee list.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 06:24:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4395613#M174521</guid>
      <dc:creator>KW123</dc:creator>
      <dc:date>2025-02-05T06:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Table Relationships</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4396136#M174533</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="410720" data-lia-user-login="KW123" class="lia-mention lia-mention-user"&gt;KW123&lt;/a&gt;&amp;nbsp;Combine the Senior, Mid, and Entry Employee goals into a single table with an additional column to indicate the employee type (Senior, Mid, Entry). This will act as a bridge table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create relationships between the bridge table and the Employee list table on the employee ID or title.&lt;BR /&gt;Create relationships between the bridge table and the Dates table on the date field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the bridge table in your visualizations instead of the individual goal tables. This will ensure that the slicer works correctly across all employee types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create DAX measures to calculate the MTD goals using the bridge table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MTD Goal = &lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'BridgeTable'[Goal]),&lt;BR /&gt;DATESMTD ( 'Dates'[Date] )&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ensure that the slicer is set to filter by store number and is connected to the Employee list table. This will filter the bridge table through the relationships.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 10:21:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4396136#M174533</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-05T10:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Table Relationships</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4396811#M174570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you so much for replying to this!! I created a bridge table with the employee title as a column.&amp;nbsp; I created a relationship to the employee table through the employee title, as well as to the dates table on date.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now I am getting an error saying that there is ambiguity with my sales table which is housing day to day sales&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 16:47:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4396811#M174570</guid>
      <dc:creator>KW123</dc:creator>
      <dc:date>2025-02-05T16:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Table Relationships</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4402474#M174762</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="410720" data-lia-user-login="KW123" class="lia-mention lia-mention-user"&gt;KW123&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;You did not provide your data model, so I tried to create several tables myself. However, because you involve too many tables, I am not sure whether the sample data I created is consistent with your actual situation. If it is not consistent or my solution is not helpful to you, please provide sample data in all your tables, thank you!&lt;BR /&gt;Here are my sample datas:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the relationships:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then use these DAXs to create measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Senior MTD Goal = 
CALCULATE (
    SUM ( 'Senior Employee Goals'[Goal 1] ),
    FILTER (
        ALLSELECTED ( 'Senior Employee Goals'[Date] ),
        'Senior Employee Goals'[Date] &amp;lt;= MAX ( 'Dates'[Date] ) &amp;amp;&amp;amp;
        MONTH ( 'Senior Employee Goals'[Date] ) = MONTH ( MAX ( 'Dates'[Date] ) ) &amp;amp;&amp;amp;
        YEAR ( 'Senior Employee Goals'[Date] ) = YEAR ( MAX ( 'Dates'[Date] ) )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Mid MTD Goal = 
CALCULATE (
    SUM ( 'Middle Employee Goals'[Goal 1] ),
    FILTER (
        ALLSELECTED ( 'Middle Employee Goals'[Date] ),
        'Middle Employee Goals'[Date] &amp;lt;= MAX ( 'Dates'[Date] ) &amp;amp;&amp;amp;
        MONTH ( 'Middle Employee Goals'[Date] ) = MONTH ( MAX ( 'Dates'[Date] ) ) &amp;amp;&amp;amp;
        YEAR ( 'Middle Employee Goals'[Date] ) = YEAR ( MAX ( 'Dates'[Date] ) )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Entry MTD Goal = 
CALCULATE (
    SUM ( 'Entry Employee Goals'[Goal 1] ),
    FILTER (
        ALLSELECTED ( 'Entry Employee Goals'[Date] ),
        'Entry Employee Goals'[Date] &amp;lt;= MAX ( 'Dates'[Date] ) &amp;amp;&amp;amp;
        MONTH ( 'Entry Employee Goals'[Date] ) = MONTH ( MAX ( 'Dates'[Date] ) ) &amp;amp;&amp;amp;
        YEAR ( 'Entry Employee Goals'[Date] ) = YEAR ( MAX ( 'Dates'[Date] ) )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;And the final output is as below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Dino Tao&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 08:09:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Table-Relationships/m-p/4402474#M174762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-10T08:09:41Z</dc:date>
    </item>
  </channel>
</rss>

