<?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: General Best Practice for Many to Many relationship? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/General-Best-Practice-for-Many-to-Many-relationship/m-p/3508392#M134611</link>
    <description>&lt;P&gt;i have two ideas in mind:&lt;/P&gt;
&lt;P&gt;1) you bring the cost column to table1, by merging table1 with table2 in Power Query. Then you have everything in one table - table1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) you write plot the visuals with customer number of the lookup table and a measure like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Profit = SUM(table1[Sales])-SUM(table2[Cost])&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2023 01:24:15 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-11-01T01:24:15Z</dc:date>
    <item>
      <title>General Best Practice for Many to Many relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/General-Best-Practice-for-Many-to-Many-relationship/m-p/3508366#M134608</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Originally I have a data with many to many relationship that look like the picture below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am told this is a bad practice, so I created a look up table that look like this.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But the problem with look up table is that custtomer nnumber in table1 does not filter up to the lookup table and then filter down to table2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I decide to enable by directional filter that look like this.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But bi-directional filter is also a bad design, can anyone tell me&amp;nbsp;how you would design your datamodel if you want to subtract cost from sales for the same customer number.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 00:46:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/General-Best-Practice-for-Many-to-Many-relationship/m-p/3508366#M134608</guid>
      <dc:creator>jzhao</dc:creator>
      <dc:date>2023-11-01T00:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: General Best Practice for Many to Many relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/General-Best-Practice-for-Many-to-Many-relationship/m-p/3508392#M134611</link>
      <description>&lt;P&gt;i have two ideas in mind:&lt;/P&gt;
&lt;P&gt;1) you bring the cost column to table1, by merging table1 with table2 in Power Query. Then you have everything in one table - table1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) you write plot the visuals with customer number of the lookup table and a measure like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Profit = SUM(table1[Sales])-SUM(table2[Cost])&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 01:24:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/General-Best-Practice-for-Many-to-Many-relationship/m-p/3508392#M134611</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-01T01:24:15Z</dc:date>
    </item>
  </channel>
</rss>

