<?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: Filter option (in Calculate) to take Max range only in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2084186#M47356</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry this is late response.&lt;/P&gt;&lt;P&gt;But I am curious the purpose of having this column -&amp;nbsp;&lt;STRONG&gt;Star[Max]&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;),&lt;BR /&gt;&lt;STRONG&gt;Star[Max],&lt;/STRONG&gt;&lt;BR /&gt;ASC&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this just for "Sort by&amp;nbsp;Star[Max] ASC"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Sep 2021 23:49:34 GMT</pubDate>
    <dc:creator>JustinDoh1</dc:creator>
    <dc:date>2021-09-18T23:49:34Z</dc:date>
    <item>
      <title>Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806854#M38144</link>
      <description>&lt;P&gt;&lt;EM&gt;(Sorry, this is a duplicate question that I posted few days ago, but I am posting again because I did not get a solution).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;&lt;/SPAN&gt;am trying to create a calculated column where I originally had two ranges to bring in as condition.&lt;/P&gt;&lt;P&gt;I was able to create a calcuated column with both Min and Max range, but I would like to only use Max.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an illustration:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to use this DAX and it worked fine.&lt;/P&gt;&lt;P&gt;Measure =&lt;BR /&gt;&amp;nbsp; &amp;nbsp;CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(Star[Value]),&lt;BR /&gt;&amp;nbsp; &amp;nbsp;FILTER(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Star,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Star[Min] &amp;lt;= Sum(Test[Test])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; Star[Max] &amp;gt;= SUM(Test[Test])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I would like to only use one column (Max) instead of using two columns (with Min).&lt;/P&gt;&lt;P&gt;Bottom is just an illustration..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MeasureNEW =&lt;BR /&gt;&amp;nbsp; CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VALUES(Star[Value]),&lt;BR /&gt;&amp;nbsp; FILTER(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Star,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Star[Max] &amp;gt;= MAX(Test[Test]) ??&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I accomplish it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 18:49:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806854#M38144</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-04-26T18:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806919#M38147</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296339" data-lia-user-login="JustinDoh1" class="lia-mention lia-mention-user"&gt;JustinDoh1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You cannot use&amp;nbsp;&lt;SPAN&gt;VALUES(Star[Value]) as the 1st argument for CALCULATE, it has to return a single value or be an aggregation like sum, average...ets.&lt;BR /&gt;&lt;BR /&gt;If you want to return the count, for example, do it this way&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MeasureNEW = 
  CALCULATE(
           COUNTROWS(VALUES(Star[Value])),
  FILTER(
     Star,
     Star[Max] &amp;gt;= EARLIER(Test[Test]) 
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 19:26:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806919#M38147</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-04-26T19:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806983#M38150</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this message.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 20:04:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1806983#M38150</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-04-26T20:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1807057#M38154</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296339" data-lia-user-login="JustinDoh1" class="lia-mention lia-mention-user"&gt;JustinDoh1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You wanted a Calculated Column, I think you are trying as a measure.&lt;BR /&gt;Add&amp;nbsp; as a column&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 20:42:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1807057#M38154</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-04-26T20:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1807061#M38155</link>
      <description>&lt;LI-CODE lang="csharp"&gt;[Measure] =
IF( HASONEVALUE( Test[Facility] ),
    var CurrentTestValue = SELECTEDVALUE( Test[Test] )
    return
        CALCULATE(
            SELECTEDVALUE( Star[Value] ),
            // This TOPN should return
            // just one row if everything
            // is correctly and logically
            // built and this, in turn, will
            // make only one Value be visible
            // in the context, hence SELECTEDVALUE
            // will return only one value as it
            // should be.
            TOPN(1,
                FILTER(
                    ALL( Star ),
                    CurrentTestValue &amp;lt;= Star[Max]
                ),
                Star[Max],
                ASC
            )
        )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Apr 2021 20:44:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/1807061#M38155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-26T20:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2084186#M47356</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry this is late response.&lt;/P&gt;&lt;P&gt;But I am curious the purpose of having this column -&amp;nbsp;&lt;STRONG&gt;Star[Max]&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;),&lt;BR /&gt;&lt;STRONG&gt;Star[Max],&lt;/STRONG&gt;&lt;BR /&gt;ASC&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this just for "Sort by&amp;nbsp;Star[Max] ASC"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 23:49:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2084186#M47356</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-09-18T23:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2085910#M47406</link>
      <description>&lt;P&gt;&lt;A href="https://dax.guide/topn" target="_self"&gt;TOPN&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 09:47:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2085910#M47406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-20T09:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Filter option (in Calculate) to take Max range only</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2086724#M47456</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your feedback. I guess you meant &lt;STRONG&gt;Star[Max],&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;ASC replaces the functionality of&amp;nbsp;&lt;/SPAN&gt;TOPN.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 16:47:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-option-in-Calculate-to-take-Max-range-only/m-p/2086724#M47456</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-09-20T16:47:54Z</dc:date>
    </item>
  </channel>
</rss>

