<?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: Userelationship is not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336735#M172199</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692336" data-lia-user-login="_-Christian-_" class="lia-mention lia-mention-user"&gt;_-Christian-_&lt;/a&gt;&amp;nbsp;- The relationships in your screenshot are a mess. this model definitely has ambiguous pathways for filtering to travel and is very unlikely to give correct answers even if USERELATIONSHIP worked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see you have an active one-to-many relationship from incident_metric to sn_incident_task, then an active one-to-many relationship from&amp;nbsp;sn_incident_task to sn_task_sla - the calculation is following this routeway, and therefore USERELATIONSHIP does not need to be invoked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you read up on Star Schema's in Power BI. I also have a useful blog on the impact of relationships -&amp;nbsp;&lt;A href="https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/" target="_blank"&gt;https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helps, please accept as the solution, it helps with others facing the same challenge.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2024 10:20:00 GMT</pubDate>
    <dc:creator>mark_endicott</dc:creator>
    <dc:date>2024-12-19T10:20:00Z</dc:date>
    <item>
      <title>Userelationship is not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336605#M172193</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some problems by using userelationship in my data model. I am not sure why it is not working. I read a lot of articles in the forum but found nothing. Hope you can help.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;My data model has the following form:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;BR /&gt;The relations are:&amp;nbsp;&lt;BR /&gt;sn_incident_task ( task_number) &amp;lt;-&amp;gt; sn_task_sla (task_number), active&lt;BR /&gt;sn_incident_task (inc_number) &amp;lt;- sn_incident_metric (inc_number), active&lt;BR /&gt;sn_incident_metric (inc_number) -&amp;gt; sn_task_sla (inc_number), inactive&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Lets take this simple Calculation to show my problem. I want to create a new column that draw a column from another column.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. Measure with userelationship:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Assignment Group with relationship&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(incident_metric[assignment_group (groups)]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(incident_metric[inc_number], sn_task_sla[inc_number])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;BR /&gt;2. Without Userelationship to use only the active relation.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Assignment Group active =&lt;/SPAN&gt; &lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;incident_metric&lt;/SPAN&gt;&lt;SPAN&gt;[assignment_group (groups)]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;As you see in the picture, both columns are identical. (Beacause of sensitive data, I filter for other and blank.)&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;The result of the calculation is wrong. It is everytime use the active relation and not the inactive. For other inactive relations userleationships works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What did I wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;BR /&gt;Christian&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 09:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336605#M172193</guid>
      <dc:creator>_-Christian-_</dc:creator>
      <dc:date>2024-12-19T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Userelationship is not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336714#M172198</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;It might be good to use a measure instead of a column, but even in the event of using a column consider the following dax instead of use relationship&lt;BR /&gt;&lt;BR /&gt;table 45&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;table 46&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;relation between ur1&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;46 &lt;SPAN&gt;Column =&lt;/SPAN&gt; &lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (45)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;46&amp;nbsp;&lt;SPAN&gt;Column &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_v&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;[ur1]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;RETURN&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;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (45)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (45)'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table (45)'&lt;/SPAN&gt;&lt;SPAN&gt;[u2]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;_v&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;end result&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;This will give expected result without added relationships&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Dec 2024 10:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336714#M172198</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2024-12-19T10:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Userelationship is not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336735#M172199</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692336" data-lia-user-login="_-Christian-_" class="lia-mention lia-mention-user"&gt;_-Christian-_&lt;/a&gt;&amp;nbsp;- The relationships in your screenshot are a mess. this model definitely has ambiguous pathways for filtering to travel and is very unlikely to give correct answers even if USERELATIONSHIP worked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see you have an active one-to-many relationship from incident_metric to sn_incident_task, then an active one-to-many relationship from&amp;nbsp;sn_incident_task to sn_task_sla - the calculation is following this routeway, and therefore USERELATIONSHIP does not need to be invoked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you read up on Star Schema's in Power BI. I also have a useful blog on the impact of relationships -&amp;nbsp;&lt;A href="https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/" target="_blank"&gt;https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helps, please accept as the solution, it helps with others facing the same challenge.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 10:20:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Userelationship-is-not-working/m-p/4336735#M172199</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-12-19T10:20:00Z</dc:date>
    </item>
  </channel>
</rss>

