<?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 Context of Table or Measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-of-Table-or-Measures/m-p/3580980#M138127</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466130" data-lia-user-login="showy123" class="lia-mention lia-mention-user"&gt;showy123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create &lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-what-if" target="_blank" rel="noopener"&gt;numerical parameters&lt;/A&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Brix = GENERATESERIES(0, 50, 1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;pH = GENERATESERIES(0, 20, 1)&lt;/LI-CODE&gt;
&lt;P&gt;(3)We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag = IF(MAX('Table'[Brix Lower]) &amp;gt;= MIN('Brix'[Brix]) &amp;amp;&amp;amp; MAX('Table'[Brix Upper]) &amp;lt;= MAX('Brix'[Brix]) &amp;amp;&amp;amp; MAX('Table'[pH Lower])&amp;gt;= MIN('pH'[pH]) &amp;amp;&amp;amp; MAX('Table'[pH Upper]) &amp;lt;= MAX('pH'[pH]),1,0)&lt;/LI-CODE&gt;
&lt;P&gt;(4) Place [Flag=1] on the screening of the visual object and then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 02:59:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-12-13T02:59:42Z</dc:date>
    <item>
      <title>Filter Context of Table or Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-of-Table-or-Measures/m-p/3577262#M137941</link>
      <description>&lt;P&gt;The following initial situation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The evaluation considers measured values of characteristics in fruits. In our example, &lt;STRONG&gt;Brix&lt;/STRONG&gt; and &lt;STRONG&gt;pH&lt;/STRONG&gt;. In the real case there are about 25 Specs which are tested.&lt;BR /&gt;A range is to be controlled via the slicers in order to filter the table and find out which products comply with the ranges.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The blue table shows the initial values for each fruit.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The Measure M_SpecName_Lower/Upper check whether the lower or upper value is within the set range.&lt;BR /&gt;If the lower and upper values are within the range, the fruit is marked with a 1 1.&lt;BR /&gt;If only the lower or upper value is within the range, only the corresponding measure is given a 1.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure for determining the 1 marking has this structure. it is underlined in red because we use German words. I have replaced these with English words to make it easier to understand.&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;Now to the goal:&lt;BR /&gt;For example, I am looking for an apple with Brix 38 to 45 and pH between 6 and 10.&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;This evaluation should find fruits that fit my characteristics.&amp;nbsp;&lt;BR /&gt;I want to see Apple1 and Apple2.&lt;BR /&gt;Apple1 hits all ranges, apple2 hits only one at pH.But that is enough to want to see it. I don't want to see apple3, because &lt;STRONG&gt;one&lt;/STRONG&gt; characteristic with upper and lower values is not in the range.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So the general rule should be.&lt;BR /&gt;I select the features I want to see in SpecParamType. Then I set my ranges. As soon as a fruit in &lt;STRONG&gt;one&lt;/STRONG&gt; characteristic does not have both values within the limit, it should not be displayed.&lt;BR /&gt;&lt;BR /&gt;What is the best way to implement this?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 09:51:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-of-Table-or-Measures/m-p/3577262#M137941</guid>
      <dc:creator>showy123</dc:creator>
      <dc:date>2023-12-11T09:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context of Table or Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-of-Table-or-Measures/m-p/3580980#M138127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466130" data-lia-user-login="showy123" class="lia-mention lia-mention-user"&gt;showy123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create &lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-what-if" target="_blank" rel="noopener"&gt;numerical parameters&lt;/A&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Brix = GENERATESERIES(0, 50, 1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;pH = GENERATESERIES(0, 20, 1)&lt;/LI-CODE&gt;
&lt;P&gt;(3)We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag = IF(MAX('Table'[Brix Lower]) &amp;gt;= MIN('Brix'[Brix]) &amp;amp;&amp;amp; MAX('Table'[Brix Upper]) &amp;lt;= MAX('Brix'[Brix]) &amp;amp;&amp;amp; MAX('Table'[pH Lower])&amp;gt;= MIN('pH'[pH]) &amp;amp;&amp;amp; MAX('Table'[pH Upper]) &amp;lt;= MAX('pH'[pH]),1,0)&lt;/LI-CODE&gt;
&lt;P&gt;(4) Place [Flag=1] on the screening of the visual object and then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 02:59:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-of-Table-or-Measures/m-p/3580980#M138127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-13T02:59:42Z</dc:date>
    </item>
  </channel>
</rss>

