<?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: I have two tables with one to many relationship, what matrix shows depends on .... in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3326888#M124578</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="555045" data-lia-user-login="some_bih" class="lia-mention lia-mention-user"&gt;some_bih&lt;/a&gt; , yes, all cost centre values are present in both tables. I only showed an extract from the 'Transactions' table to show how it is structured. The 'Transactions' table has all six cost centres with various accounts and amounts.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 08:31:32 GMT</pubDate>
    <dc:creator>Marta777</dc:creator>
    <dc:date>2023-07-12T08:31:32Z</dc:date>
    <item>
      <title>I have two tables with one to many relationship, what matrix shows depends on ....</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3325770#M124533</link>
      <description>&lt;P&gt;I tried Googling but could not find an answer. I have two tables with one 1-to-many relationship (cost centres), what the matrix visual shows depends on whether I filter on cost centre in one table or the other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have created two measures M1 and M2, with differences marked in &lt;FONT color="#FF0000"&gt;red&lt;/FONT&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M1 = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(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;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Transactions'[Account]&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;3000&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; 'Transactions'[Account]&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;9000&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; 'Tag'[Tag]=&lt;/SPAN&gt;&lt;SPAN&gt;"U"&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; Transactions[FY]=&lt;/SPAN&gt;&lt;SPAN&gt;"22/23"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;M1 shows the correct totals&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;M2 shows A*,P* and R003 cost centres which should be excluded and incorrect totals for R001 and R002.&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1: Please explain why different results are produced even though my tables have only one 1-to-many relationship?&lt;/P&gt;&lt;P&gt;Q2: How M1 needs to be amended so that it shows the correct totals on the account lines? Currently, it shows as below. Please note that account 9000 should be excluded.&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&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, 11 Jul 2023 16:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3325770#M124533</guid>
      <dc:creator>Marta777</dc:creator>
      <dc:date>2023-07-11T16:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: I have two tables with one to many relationship, what matrix shows depends on ....</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3326638#M124570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368668" data-lia-user-login="Marta777" class="lia-mention lia-mention-user"&gt;Marta777&lt;/a&gt;&amp;nbsp;as you analysing results per CostCenter, I would suggest to check data about it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all cost centers values, present in both tables? So basically check&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'Transactions'[CostCentre] vs 'Tag'[CostCentre]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did I answer your question? Mark my post as a solution! Kudos Appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 06:19:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3326638#M124570</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-12T06:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: I have two tables with one to many relationship, what matrix shows depends on ....</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3326888#M124578</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="555045" data-lia-user-login="some_bih" class="lia-mention lia-mention-user"&gt;some_bih&lt;/a&gt; , yes, all cost centre values are present in both tables. I only showed an extract from the 'Transactions' table to show how it is structured. The 'Transactions' table has all six cost centres with various accounts and amounts.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 08:31:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-two-tables-with-one-to-many-relationship-what-matrix/m-p/3326888#M124578</guid>
      <dc:creator>Marta777</dc:creator>
      <dc:date>2023-07-12T08:31:32Z</dc:date>
    </item>
  </channel>
</rss>

