<?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: Help with USERELATIONSHIP and Many to Many in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3904645#M152133</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335553" data-lia-user-login="esulyma" class="lia-mention lia-mention-user"&gt;esulyma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try to create a bridge table and the table stores the unique sailing key.&lt;/P&gt;
&lt;P&gt;Then, create the relationship between the bridge table and passenger table, sailings table.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What’s more, try to modify the measure to the following dax formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Revenue (Mapped) =
CALCULATE(
    [Revenue],
    USERELATIONSHIP('BridgeTable'[Sailing Key], 'Sailings'[Mapped Sailing Key])
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;You can also view the following documents to learn more information.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/userelationship-function-dax" target="_blank"&gt;USERELATIONSHIP function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many" target="_blank"&gt;Many-to-many relationship guidance - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2024 08:48:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-09T08:48:19Z</dc:date>
    <item>
      <title>Help with USERELATIONSHIP and Many to Many</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3903436#M152094</link>
      <description>&lt;P&gt;Hello Fabric Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to solve this DAX/Model problem, here's the scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dimension table with an event called "original sailing key" and "mapped saling key", the problem I have is the "mapped" key has duplicate values so my inactive relationship is a many-to-many type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Revenue (Mapped) =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Revenue]&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;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Passenger'&lt;/SPAN&gt;&lt;SPAN&gt;[Ship Sddt]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Sailings&lt;/SPAN&gt;&lt;SPAN&gt;[Mapped Sailing Key]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is causing my measure "Revenue (Mapped)" to work incorrectly with the duplicate values.&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;How can I adjust my measure to work around the duplicate values and bringing in the right revenue amount?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 21:00:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3903436#M152094</guid>
      <dc:creator>esulyma</dc:creator>
      <dc:date>2024-05-08T21:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with USERELATIONSHIP and Many to Many</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3904645#M152133</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335553" data-lia-user-login="esulyma" class="lia-mention lia-mention-user"&gt;esulyma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try to create a bridge table and the table stores the unique sailing key.&lt;/P&gt;
&lt;P&gt;Then, create the relationship between the bridge table and passenger table, sailings table.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What’s more, try to modify the measure to the following dax formula.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Revenue (Mapped) =
CALCULATE(
    [Revenue],
    USERELATIONSHIP('BridgeTable'[Sailing Key], 'Sailings'[Mapped Sailing Key])
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;You can also view the following documents to learn more information.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/userelationship-function-dax" target="_blank"&gt;USERELATIONSHIP function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many" target="_blank"&gt;Many-to-many relationship guidance - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 08:48:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3904645#M152133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-09T08:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with USERELATIONSHIP and Many to Many</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3905593#M152150</link>
      <description>&lt;P&gt;Hello! Thanks for your reply, I tried this before without any sucess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I gave it another shot with your guidance, below are the changes I made where it shows the unexpected results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Visual view where the Revenue (Mapped) measure doesn't show the expected value for mapped (starting in $9):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 12:53:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-USERELATIONSHIP-and-Many-to-Many/m-p/3905593#M152150</guid>
      <dc:creator>esulyma</dc:creator>
      <dc:date>2024-05-09T12:53:51Z</dc:date>
    </item>
  </channel>
</rss>

