<?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: Problem with USERELATIONSHIP in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715055#M1190</link>
    <description>&lt;P&gt;yeah&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="144365" data-lia-user-login="avanderschilden" class="lia-mention lia-mention-user"&gt;avanderschilden&lt;/a&gt;&amp;nbsp; changing your first expression from&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CALCULATE(
[SalesAmount],// its a measure with expression SUMX(Sales,Sales[Quantity]*Sales[Unit Price])
USERELATIONSHIP('Date'[DateKey],Sales[DeliveryDateKey]),
YEAR('Date'[Date])=2007 // Changed from &lt;SPAN&gt;YEAR(Sales[DeliveryDate])=2007 allowed 2007 sales w.r.t to delivered date on all CY&lt;/SPAN&gt;
)&lt;/PRE&gt;&lt;P&gt;Thanks for your guidance, much appreciated&amp;nbsp;:manhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harry&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2019 09:14:30 GMT</pubDate>
    <dc:creator>HarsimranPWRBI</dc:creator>
    <dc:date>2019-06-14T09:14:30Z</dc:date>
    <item>
      <title>Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714002#M1144</link>
      <description>&lt;P&gt;I'm trying to create a measure to get Sales Amount w.r.t Delivered Date where CalenderYear is 2007 but having trouble with same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Sales Amount w.r.t Delivered Date works well&amp;nbsp; and show amount for Delivered Date CY 2007 with UserRelationship, but when i try to filter only for 2007 its show blank rows :mansurprised: :manfrustrated:.&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;I'm using &lt;A href="http://aka.ms/GuidetoDAX/files" target="_self"&gt;ContosoDw&lt;/A&gt;&amp;nbsp;for reference and below is code of two measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sales w.r.t Delivered Date&lt;/P&gt;&lt;PRE&gt;Delivered Amount = 
CALCULATE (
[SalesAmount],
USERELATIONSHIP ( Sales[DeliveryDateKey], 'Date'[DateKey] )
)&lt;/PRE&gt;&lt;P&gt;Sales w.r.t to DeliveredDate for Year 2007&lt;/P&gt;&lt;PRE&gt;Delivered Amount in 2007 = 
CALCULATE (
[Sales Amount],
FILTER (
CALCULATETABLE (
Sales,
USERELATIONSHIP( Sales[DeliveryDateKey], 'Date'[DateKey] )
),
RELATED ( 'Date'[Calendar Year Number] ) = 2007
)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 11:24:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714002#M1144</guid>
      <dc:creator>HarsimranPWRBI</dc:creator>
      <dc:date>2019-06-13T11:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714385#M1167</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this (with the correct table and column names from your model) ;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Delivered Amount 2007 = &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;SUM(Sales[Amount]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USERELATIONSHIP('Date'[Date],Sales[DeliveryDate]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YEAR(Sales[DeliveryDate])=2007&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;&lt;SPAN&gt;Let me know!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Adrian&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:12:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714385#M1167</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-06-13T18:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714980#M1184</link>
      <description>&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its showing below error (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;USERRELATIONSHIP function can only use the two columns references participating in relationship&lt;/STRONG&gt;&lt;/FONT&gt;), while using your concept. I've replaced SUM(Sales[Amount]) with measure already build.&lt;/P&gt;&lt;P&gt;Which is using an&amp;nbsp; below code as an expression&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SUMX(Sales,Sales[Quantity]*Sales[Unit Price])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:00:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714980#M1184</guid>
      <dc:creator>HarsimranPWRBI</dc:creator>
      <dc:date>2019-06-14T08:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714986#M1185</link>
      <description>Great! So it is solved right?</description>
      <pubDate>Fri, 14 Jun 2019 08:07:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/714986#M1185</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-06-14T08:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715021#M1186</link>
      <description>&lt;P&gt;Yeah it worked, and last error was due to wrong column used for relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing is ,its only showing for CY2007 and not repeating for all CY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:39:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715021#M1186</guid>
      <dc:creator>HarsimranPWRBI</dc:creator>
      <dc:date>2019-06-14T08:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715043#M1188</link>
      <description>&lt;P&gt;This will show the delivered amount in 2017 on all year lines;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Delivered Amount 2017 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE([Delivered Amount],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YEAR('Date'[Date])=2018)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jun 2019 09:01:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715043#M1188</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-06-14T09:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with USERELATIONSHIP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715055#M1190</link>
      <description>&lt;P&gt;yeah&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="144365" data-lia-user-login="avanderschilden" class="lia-mention lia-mention-user"&gt;avanderschilden&lt;/a&gt;&amp;nbsp; changing your first expression from&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CALCULATE(
[SalesAmount],// its a measure with expression SUMX(Sales,Sales[Quantity]*Sales[Unit Price])
USERELATIONSHIP('Date'[DateKey],Sales[DeliveryDateKey]),
YEAR('Date'[Date])=2007 // Changed from &lt;SPAN&gt;YEAR(Sales[DeliveryDate])=2007 allowed 2007 sales w.r.t to delivered date on all CY&lt;/SPAN&gt;
)&lt;/PRE&gt;&lt;P&gt;Thanks for your guidance, much appreciated&amp;nbsp;:manhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 09:14:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-USERELATIONSHIP/m-p/715055#M1190</guid>
      <dc:creator>HarsimranPWRBI</dc:creator>
      <dc:date>2019-06-14T09:14:30Z</dc:date>
    </item>
  </channel>
</rss>

