<?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: Issue with MINX DAX Calculation in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Issue-with-MINX-DAX-Calculation/m-p/702768#M10503</link>
    <description>&lt;P&gt;The problem here is that in the call to Filter() the reference to Patient_Population2 brings in the value of the start_date as part of the filter context. So when you calcuate the first row it's filtering for the min of start_date where start_date = 11/5/2018.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One way to fix this would be to wrap the table reference in the ALL() function&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IPST = VAR Per=SELECTEDVALUE(Patient_Population2[Person_id])
RETURN MINX(FILTER( &lt;STRONG&gt;ALL(&lt;/STRONG&gt; Patient_Population2 &lt;STRONG&gt;)&lt;/STRONG&gt;,Patient_Population2[Person_id]=Per),Patient_Population2[start_date].[Date])&lt;/PRE&gt;&lt;P&gt;A different pattern which should achieve the same effect and is slightly simpler is the following&lt;/P&gt;&lt;PRE&gt;IPST = VAR Per=SELECTEDVALUE(Patient_Population2[Person_id])
RETURN CALCULATE( MIN(Patient_Population2[start_date].[Date]), Patient_Population2[Person_id] = Per)&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 May 2019 21:37:02 GMT</pubDate>
    <dc:creator>d_gosbell</dc:creator>
    <dc:date>2019-05-29T21:37:02Z</dc:date>
    <item>
      <title>Issue with MINX DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Issue-with-MINX-DAX-Calculation/m-p/702714#M10502</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate minimum start_date as IPST for a customer as below-&lt;/P&gt;&lt;P&gt;IPST = VAR Per=SELECTEDVALUE(Patient_Population2[Person_id])&lt;BR /&gt;RETURN MINX(FILTER(Patient_Population2,Patient_Population2[Person_id]=Per),Patient_Population2[start_date].[Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a table visual.&lt;BR /&gt;Patient_Population2 table lists all the start_dates for a customer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I am getting is a value similar to start_date column for IPST, see screen shot below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am expecting the output to be this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 19:21:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Issue-with-MINX-DAX-Calculation/m-p/702714#M10502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-29T19:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with MINX DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Issue-with-MINX-DAX-Calculation/m-p/702768#M10503</link>
      <description>&lt;P&gt;The problem here is that in the call to Filter() the reference to Patient_Population2 brings in the value of the start_date as part of the filter context. So when you calcuate the first row it's filtering for the min of start_date where start_date = 11/5/2018.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One way to fix this would be to wrap the table reference in the ALL() function&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IPST = VAR Per=SELECTEDVALUE(Patient_Population2[Person_id])
RETURN MINX(FILTER( &lt;STRONG&gt;ALL(&lt;/STRONG&gt; Patient_Population2 &lt;STRONG&gt;)&lt;/STRONG&gt;,Patient_Population2[Person_id]=Per),Patient_Population2[start_date].[Date])&lt;/PRE&gt;&lt;P&gt;A different pattern which should achieve the same effect and is slightly simpler is the following&lt;/P&gt;&lt;PRE&gt;IPST = VAR Per=SELECTEDVALUE(Patient_Population2[Person_id])
RETURN CALCULATE( MIN(Patient_Population2[start_date].[Date]), Patient_Population2[Person_id] = Per)&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 21:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Issue-with-MINX-DAX-Calculation/m-p/702768#M10503</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2019-05-29T21:37:02Z</dc:date>
    </item>
  </channel>
</rss>

