<?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 in a filtered measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/708967#M992</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; hmm not full sure but try following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 
Daily_Goal = 
VAR EmpCount = CALCULATE(COUNTROWS('Employees'),
FILTER( Employees,
                                                 'Employees'[StartDate]&amp;lt;='Date'[Date]
),
                                                  USERELATIONSHIP( 'Employees'[StartDate], 'Date'[Date]))
RETURN
20 * EmpCount&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Jun 2019 01:15:34 GMT</pubDate>
    <dc:creator>parry2k</dc:creator>
    <dc:date>2019-06-07T01:15:34Z</dc:date>
    <item>
      <title>USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/708888#M987</link>
      <description>&lt;P&gt;I need to create a measure that calculates daily goals over time based on the number of active employess. I have an inactive relationship between 'Employees'[StartDate]&amp;nbsp;and 'Date'[Date]. I have tried using the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daily_Goal =&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR EmpCount = CALCULATE(COUNTROWS('Employees'),&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Employees'[StartDate]&amp;lt;='Date'[Date],&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USERELATIONSHIP( 'Employees'[StartDate], 'Date'[Date]))&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;20 * EmpCount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I receive an error that "the expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to calculate this goal using an inactive relationship? I am unable to make this relationship active as I have a different table with an active relationship that links between the 'Date' table and the 'Employees' table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 21:20:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/708888#M987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-06T21:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/708967#M992</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; hmm not full sure but try following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 
Daily_Goal = 
VAR EmpCount = CALCULATE(COUNTROWS('Employees'),
FILTER( Employees,
                                                 'Employees'[StartDate]&amp;lt;='Date'[Date]
),
                                                  USERELATIONSHIP( 'Employees'[StartDate], 'Date'[Date]))
RETURN
20 * EmpCount&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jun 2019 01:15:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/708967#M992</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-06-07T01:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709481#M1009</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp; thank you but unfortunately this solution gives an error message that "A single value for column 'Date' in table 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 13:43:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709481#M1009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-07T13:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709490#M1010</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; sorry, change Date[Date] to MAX( Date[Date] )&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 13:56:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709490#M1010</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-06-07T13:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709494#M1011</link>
      <description>&lt;P&gt;Adding MAX does get rid of the error but only calculates for the dates linked between the two tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the following in the Employee Table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Employee&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &lt;STRONG&gt;StartDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Employee1&amp;nbsp; &amp;nbsp; 1/2/2019&amp;nbsp;&lt;/P&gt;&lt;P&gt;Employee2&amp;nbsp; &amp;nbsp; 1/2/2019&lt;/P&gt;&lt;P&gt;Employee3&amp;nbsp; &amp;nbsp; 1/5/2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure returns the following if I drop it in a table with continuous dates&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Daily_Goal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1/2/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;1/3/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;NULL&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;1/4/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;NULL&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;1/5/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I am looking for is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Daily_Goal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1/2/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;1/3/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;1/4/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;1/5/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 60&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 14:04:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709494#M1011</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-07T14:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709495#M1012</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; seems like I'm missing something here. seems like you are looking running total&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Daily_Goal = 
VAR EmpCount = 
CALCULATE(COUNTROWS('Employees'),
USERELATIONSHIP( 'Employees'[StartDate], 'Date'[Date]))
FILTER( ALL(Date ),
Date[Date] &amp;lt;= MAX( Date[Date]
),
RETURN
20 * EmpCount&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jun 2019 14:09:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709495#M1012</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-06-07T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709497#M1013</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp;That's it!! Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 14:13:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/709497#M1013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-07T14:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: USERELATIONSHIP in a filtered measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/1286605#M22038</link>
      <description>&lt;P&gt;but your solution has synta errors !!!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 07:52:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/USERELATIONSHIP-in-a-filtered-measure/m-p/1286605#M22038</guid>
      <dc:creator>Analitika</dc:creator>
      <dc:date>2020-08-11T07:52:14Z</dc:date>
    </item>
  </channel>
</rss>

