<?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: Conditional Filter Arguments in CALCULATE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Filter-Arguments-in-CALCULATE/m-p/3832240#M149847</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="722798" data-lia-user-login="kappasig504" class="lia-mention lia-mention-user"&gt;kappasig504&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try the following expression where [Some Table Is Filtered] needs to return true or false depending on your data writing.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR IsFiltered = [Some Table Is Filtered]
VAR Result = 
IF(
    IsFiltered,
    CALCULATE(
        [Some Measure],
        TREATAS(
            VALUES(Some Table[Column]),
            'Other Table'[Column]
        )
    ),
   CALCULATE( [Some Measure])
)
RETURN
Result
&lt;/LI-CODE&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 02:38:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-12T02:38:32Z</dc:date>
    <item>
      <title>Conditional Filter Arguments in CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Filter-Arguments-in-CALCULATE/m-p/3831396#M149799</link>
      <description>&lt;P&gt;Is there a way to do something like this? I only want the TREATAS filter argument to evaluate if a condition evaluates to true, otherwise I'd like the CALCULATE function to ignore the TREATAS filter argument entirely.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[Some Measure],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;IF(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Some Table Is Filtered],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TREATAS(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(Some Table[Column]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Other Table'[Column]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 16:01:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Filter-Arguments-in-CALCULATE/m-p/3831396#M149799</guid>
      <dc:creator>kappasig504</dc:creator>
      <dc:date>2024-04-11T16:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Filter Arguments in CALCULATE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Filter-Arguments-in-CALCULATE/m-p/3832240#M149847</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="722798" data-lia-user-login="kappasig504" class="lia-mention lia-mention-user"&gt;kappasig504&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try the following expression where [Some Table Is Filtered] needs to return true or false depending on your data writing.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR IsFiltered = [Some Table Is Filtered]
VAR Result = 
IF(
    IsFiltered,
    CALCULATE(
        [Some Measure],
        TREATAS(
            VALUES(Some Table[Column]),
            'Other Table'[Column]
        )
    ),
   CALCULATE( [Some Measure])
)
RETURN
Result
&lt;/LI-CODE&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 02:38:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Filter-Arguments-in-CALCULATE/m-p/3832240#M149847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-12T02:38:32Z</dc:date>
    </item>
  </channel>
</rss>

