<?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: Using a Boolean expression with CALCULATE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86071#M129</link>
    <description>&lt;P&gt;If 'Facts'[UnitPrice] is a calculated column, this expression&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover])&lt;BR /&gt;                     ;'Facts'[UnitPrice]&amp;gt;=50&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;is just a shortcut for:&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover])&lt;BR /&gt;                ;FILTER( ALL('Facts'[UnitPrice])&lt;BR /&gt;                    ;'Facts'[UnitPrice]&amp;gt;=50&lt;BR /&gt;                )&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If 'Facts'[UnitPrice] is a measure, however, you will get an error message about CALCULATE not being allowed in a filter expression expression (of a CALCULATE expression).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it what is happening here?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2016 09:31:37 GMT</pubDate>
    <dc:creator>LaurentCouartou</dc:creator>
    <dc:date>2016-11-04T09:31:37Z</dc:date>
    <item>
      <title>Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/84322#M122</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me why this expression of a calculated measure works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover]);FILTER('Facts';'Facts'[UnitPrice]&amp;gt;=50))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Whereas this one doesn't:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover]);'Facts'[UnitPrice]&amp;gt;=50)&lt;/PRE&gt;&lt;P&gt;I know CALCULATE can use a&amp;nbsp;&lt;SPAN&gt;Boolean expression or a table expression that defines a filter, but isn't the second expression using a Bolean condition:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;'Facts'[UnitPrice]&amp;gt;=50&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 18:02:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/84322#M122</guid>
      <dc:creator>webportal</dc:creator>
      <dc:date>2016-10-31T18:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85796#M125</link>
      <description>&lt;P&gt;In what sense does the second formula "not work"? It appears to work fine in my test.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 19:56:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85796#M125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-03T19:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85833#M126</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error:&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means something like: "A CALCULATE function was used in a&amp;nbsp;TRUE/FALSE expression as a table filter. This is not allowed".&lt;/P&gt;&lt;P&gt;And this message gets me even more confused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the following function works perfectly:&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 21:20:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85833#M126</guid>
      <dc:creator>webportal</dc:creator>
      <dc:date>2016-11-03T21:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85855#M127</link>
      <description>&lt;P&gt;Are you adding that formula as a measure or a column?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 23:27:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/85855#M127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-03T23:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86058#M128</link>
      <description>&lt;P&gt;As a measure.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 09:03:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86058#M128</guid>
      <dc:creator>webportal</dc:creator>
      <dc:date>2016-11-04T09:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86071#M129</link>
      <description>&lt;P&gt;If 'Facts'[UnitPrice] is a calculated column, this expression&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover])&lt;BR /&gt;                     ;'Facts'[UnitPrice]&amp;gt;=50&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;is just a shortcut for:&lt;/P&gt;&lt;PRE&gt;Measure = CALCULATE(SUM(Facts[Turnover])&lt;BR /&gt;                ;FILTER( ALL('Facts'[UnitPrice])&lt;BR /&gt;                    ;'Facts'[UnitPrice]&amp;gt;=50&lt;BR /&gt;                )&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If 'Facts'[UnitPrice] is a measure, however, you will get an error message about CALCULATE not being allowed in a filter expression expression (of a CALCULATE expression).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it what is happening here?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 09:31:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86071#M129</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-11-04T09:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86074#M130</link>
      <description>&lt;P&gt;Yes,&amp;nbsp;&lt;SPAN&gt;'Facts'[UnitPrice] is a measure.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 09:36:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86074#M130</guid>
      <dc:creator>webportal</dc:creator>
      <dc:date>2016-11-04T09:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86105#M131</link>
      <description>&lt;P&gt;Then you have your answer. :manhappy:&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 10:33:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86105#M131</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-11-04T10:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86195#M132</link>
      <description>&lt;P&gt;Ok, so the answer is I can't use a calculated measure in CALCULATE but I can use in FILTER function, correct?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 14:27:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86195#M132</guid>
      <dc:creator>webportal</dc:creator>
      <dc:date>2016-11-04T14:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86260#M133</link>
      <description>This is correct. No measure or CALCULATE expression, unless you write a full FILTER expression around it.</description>
      <pubDate>Fri, 04 Nov 2016 17:03:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/86260#M133</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-11-04T17:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Boolean expression with CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/4744163#M181654</link>
      <description>&lt;P&gt;For a calculated column, you have the row context active, so row by row you can use the boolen expression. For the measure, there would be no row context active as it would be expected by the boolean expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 19:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-a-Boolean-expression-with-CALCULATE/m-p/4744163#M181654</guid>
      <dc:creator>Uderman</dc:creator>
      <dc:date>2025-06-25T19:07:47Z</dc:date>
    </item>
  </channel>
</rss>

