<?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 ALLSELECTED alternative, check one value against multiple in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLSELECTED-alternative-check-one-value-against-multiple/m-p/1466167#M27733</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a query regarding a DAX statement to determine if one value is greater than the other in a matrix. One column contains one value (4.00) and the other contains a number of values (1, 3, 2000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to determine the best way of seeing if the value in column A is greater than those in column B, if it is, give it a 1, else 0. I have achieved this, but the problem is, before filtering on LOD and GAC, it doesn't seem to work:&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;When I add a filter on to show only 1 and 3:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works! But why? The query I am using is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExceedCheck = 

VAR GAC =
    MAXX (
        ALLSELECTED ( 'Overall Query'[GAC]),
        CALCULATE (
            MAX ( 'Overall Query'[GAC] )
        )
    )
VAR LOD =
    MAXX (
        ALLSELECTED ( 'Overall Query'[LOD]),
        CALCULATE (
            MAX ( 'Overall Query'[LOD] )
        )
    )
RETURN
    SWITCH (
        TRUE (),
        
        NOT ISBLANK ( LOD ) &amp;amp;&amp;amp; NOT ISBLANK ( GAC ) &amp;amp;&amp;amp; LOD &amp;gt;= GAC, 1,
        
        0
    )&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 30 Oct 2020 14:40:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-30T14:40:56Z</dc:date>
    <item>
      <title>ALLSELECTED alternative, check one value against multiple</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLSELECTED-alternative-check-one-value-against-multiple/m-p/1466167#M27733</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a query regarding a DAX statement to determine if one value is greater than the other in a matrix. One column contains one value (4.00) and the other contains a number of values (1, 3, 2000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to determine the best way of seeing if the value in column A is greater than those in column B, if it is, give it a 1, else 0. I have achieved this, but the problem is, before filtering on LOD and GAC, it doesn't seem to work:&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;When I add a filter on to show only 1 and 3:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works! But why? The query I am using is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExceedCheck = 

VAR GAC =
    MAXX (
        ALLSELECTED ( 'Overall Query'[GAC]),
        CALCULATE (
            MAX ( 'Overall Query'[GAC] )
        )
    )
VAR LOD =
    MAXX (
        ALLSELECTED ( 'Overall Query'[LOD]),
        CALCULATE (
            MAX ( 'Overall Query'[LOD] )
        )
    )
RETURN
    SWITCH (
        TRUE (),
        
        NOT ISBLANK ( LOD ) &amp;amp;&amp;amp; NOT ISBLANK ( GAC ) &amp;amp;&amp;amp; LOD &amp;gt;= GAC, 1,
        
        0
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Oct 2020 14:40:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLSELECTED-alternative-check-one-value-against-multiple/m-p/1466167#M27733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T14:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: ALLSELECTED alternative, check one value against multiple</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLSELECTED-alternative-check-one-value-against-multiple/m-p/1466529#M27750</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share the actual pbix, or one with dummy data the reproduces the problem?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 19:17:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALLSELECTED-alternative-check-one-value-against-multiple/m-p/1466529#M27750</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-10-30T19:17:27Z</dc:date>
    </item>
  </channel>
</rss>

