<?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: Table Relationship Query USERELATIONSHIP() in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1406065#M25950</link>
    <description>&lt;P&gt;Update: I was able to resolve the issue using the below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ Tickets_Resolved ] = 
   
 VAR 
    PPMTickets = CALCULATETABLE (
                FILTER ( AllPPMTickets, AllPPMTickets[Resolved_status] = TRUE ),
                USERELATIONSHIP ( AllPPMTickets[Resolved_date_time], Dates[Date] )
            )
            
RETURN
    COUNTROWS( PPMTickets ) &lt;/LI-CODE&gt;&lt;P&gt;Thank you again for your help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2020 00:49:17 GMT</pubDate>
    <dc:creator>jaime_blackwell</dc:creator>
    <dc:date>2020-10-01T00:49:17Z</dc:date>
    <item>
      <title>Table Relationship Query USERELATIONSHIP()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1405977#M25945</link>
      <description>&lt;DIV&gt;Hi Community,&lt;/DIV&gt;&lt;DIV&gt;I am having some difficulty using USERELATIONSHIP function in Power BI and I'm hoping I can get some assistance. I have an inactive relationship between 2 tables, and I want to activate it for the calculation of a measure. I have used the attached formula, however if I simply activate the relationship, the values appearing in my visualisations are different to the values calculated by the measure.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Shouldn't USERELATIONSHIP() behave as if the relationship were active?&lt;/DIV&gt;&lt;DIV&gt;Thank you.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[ Tickets_Resolved ] = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE ( &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTX( AllPPMTickets, AllPPMTickets[Ticket_id] ), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USERELATIONSHIP(AllPPMTickets[Resolved_date_time], Dates[Date] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER( AllPPMTickets , AllPPMTickets[Resolved_status] = TRUE )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Sep 2020 22:40:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1405977#M25945</guid>
      <dc:creator>jaime_blackwell</dc:creator>
      <dc:date>2020-09-30T22:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Table Relationship Query USERELATIONSHIP()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1405988#M25946</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="232204" data-lia-user-login="jaime_blackwell" class="lia-mention lia-mention-user"&gt;jaime_blackwell&lt;/a&gt;&amp;nbsp;, based on your description, I think the order of evalution in CALCULATE matters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE(&amp;lt;expression&amp;gt;[, &amp;lt;filter1&amp;gt; [, &amp;lt;filter2&amp;gt; [, …]]])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filters evaluate parallelly, which means, in your case,&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;FILTER( AllPPMTickets , AllPPMTickets[Resolved_status] = TRUE )&lt;/EM&gt; doesn't get affected by&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;USERELATIONSHIP(AllPPMTickets[Resolved_date_time], Dates[Date] )&lt;/EM&gt;; it evaluates under the former active relationship.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may try this measure,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ Tickets_Resolved ] =
CALCULATE (
    COUNTX ( AllPPMTickets, AllPPMTickets[Ticket_id] ),
    CALCULATETABLE (
        FILTER ( AllPPMTickets, AllPPMTickets[Resolved_status] = TRUE ),
        USERELATIONSHIP ( AllPPMTickets[Resolved_date_time], Dates[Date] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 23:16:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1405988#M25946</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2020-09-30T23:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Table Relationship Query USERELATIONSHIP()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1406042#M25948</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks so much for that suggestion, however the values produced by the measure you provided are the same. I figured that the order of the filter and userelationship functions would be irrelevant because the relationship does not affect the filtered column, so the result should be the same either way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure is basically behaving as though the USERELATIONSHIP() function isn't working at all.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 00:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1406042#M25948</guid>
      <dc:creator>jaime_blackwell</dc:creator>
      <dc:date>2020-10-01T00:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Table Relationship Query USERELATIONSHIP()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1406065#M25950</link>
      <description>&lt;P&gt;Update: I was able to resolve the issue using the below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ Tickets_Resolved ] = 
   
 VAR 
    PPMTickets = CALCULATETABLE (
                FILTER ( AllPPMTickets, AllPPMTickets[Resolved_status] = TRUE ),
                USERELATIONSHIP ( AllPPMTickets[Resolved_date_time], Dates[Date] )
            )
            
RETURN
    COUNTROWS( PPMTickets ) &lt;/LI-CODE&gt;&lt;P&gt;Thank you again for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 00:49:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Relationship-Query-USERELATIONSHIP/m-p/1406065#M25950</guid>
      <dc:creator>jaime_blackwell</dc:creator>
      <dc:date>2020-10-01T00:49:17Z</dc:date>
    </item>
  </channel>
</rss>

