<?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: Help me understand Calculate steps in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3043884#M104561</link>
    <description>&lt;P&gt;Thank You for Your answer, I am a kind of person who still want to understand as much as possible:)&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 22:26:24 GMT</pubDate>
    <dc:creator>Zx2000</dc:creator>
    <dc:date>2023-01-25T22:26:24Z</dc:date>
    <item>
      <title>Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041051#M104315</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to learn DAX and many things there are a real mystery which leads to rael frustration. At this stage Ii am trying to understand steps for CALCULATE from a DAX Bible, however there are many terms that are used there which are unclear in each step (like smth is applied or evaluated...ehh) . I have a dax code as below&amp;nbsp; and I am trying to figure out why it gives particular result. The matrix in report uses colors as rows from product[color]&amp;nbsp; ( so it creates initial outer filter context). Could somebody tell me what is done in each step od Calculate alogirthm. I though I had understood it but...nope.&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 class="lia-indent-padding-left-30px"&gt;test 1 =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[Sales Amount],&lt;BR /&gt;KEEPFILTERS (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Product'[Color] ),&lt;BR /&gt;'Product'[Color] = "Red"&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;ALL ( 'Product'[Color] )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 17:49:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041051#M104315</guid>
      <dc:creator>Zx2000</dc:creator>
      <dc:date>2023-01-24T17:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041201#M104323</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="495487" data-lia-user-login="Zx2000" class="lia-mention lia-mention-user"&gt;Zx2000&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The filter argument ( FILTER ( ALL (&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'Product'[Color] ),&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'Product'[Color] = "Red" ) is first evaluated.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Then the CALCULATE modifiers KEEPFILTERS and ALL are applied over the outer filter context therefore, the outer filter will be kept all. In other words each color in the outer filter context will become all the colors and it will not be replaced by the inner filter rather it will be intersected with it. Apparently, the intersection between all the colors and "Red" will result in "Red" everywhere.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 19:23:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041201#M104323</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-24T19:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041323#M104336</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;1. What does it mean that is being evaluated? Does it give a table in particular outer filter conditions and is kept without any other further influence? Like some kind of constant (color = red)?&lt;/P&gt;&lt;P&gt;2.The book states that KEEPFILTERS is not a calculate modifer but argument modifier. I thought that the whole : &lt;SPAN&gt;KEEPFILTERS (&lt;/SPAN&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;SPAN&gt;ALL ( 'Product'[Color] ),&lt;/SPAN&gt;&lt;SPAN&gt;'Product'[Color] = "Red"&lt;/SPAN&gt;&lt;SPAN&gt;) is being evaluated in outer filter context as a argument, so it gives ie. BLANK in matrix's row where the "Silver" and "Red" where "Red" is. So I was sure this is the way context is being ctreated.&amp;nbsp;&lt;BR /&gt;Does it mean that KEEPFILTERS here is used only to intersect with other filters "made inside calculate and by calculate"? So in this case it is only intersect with result of ALL? And this ALL is modifing the outer contex by removing filters from color?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;I guess these questions I am asking are just top of the iceberg but I really think that understanding Calculate is important part before next step into DAX and these CALCULATE steps described in DAX Bible are very general and hard to understand. I think it is only understandable by an experienced person who wrote or create DAX:) I can't find other sources.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 21:37:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041323#M104336</guid>
      <dc:creator>Zx2000</dc:creator>
      <dc:date>2023-01-24T21:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041940#M104379</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Are the top active members in the community who have the ultimate understanding of the evaluation&amp;nbsp;contexts. Hopping any of them having the time explain this behaviour of CALCULATE.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 07:33:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041940#M104379</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-25T07:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041964#M104381</link>
      <description>&lt;P&gt;Good morning&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="495487" data-lia-user-login="Zx2000" class="lia-mention lia-mention-user"&gt;Zx2000&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually your question is extremely important and it is at the core of DAX evaluation&amp;nbsp;concepts. This in-depth understanding of the order of evaluation is the basic starting step towards professional&amp;nbsp;usage of DAX.&lt;/P&gt;
&lt;P&gt;Yes when a filter is evaluated, a table is actually calculated. This happens independently&amp;nbsp;for each calculation point (a matrix cell for example). So consider&amp;nbsp;a particular cell in table visual, the outer filter context would consist of the filters coming&amp;nbsp;from rows, columns, slicers, page filters etc.. This out filter is actually tables.&amp;nbsp;&lt;BR /&gt;When using CALCULATE to filter (using Boolean&amp;nbsp;condition) a column&amp;nbsp; that pre-exists in the outer filter context, for example:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;CALCULATE (
    [Sales Amount],
    'Product'[Color] = "Red"
)​&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Then the expression is translated into&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;CALCULATE (
    [Sales Amount],
    FILTER (
        ALL ( 'Product'[Color] ),
        'Product'[Color] = "Red"
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Because CALCULATE wants to consider ALL the colors while calculating the filter table which sound to be convenient despite being a little confusing. If you want to only consider the VALUES of colors that do exist in the outer filter context then you need to manually&amp;nbsp;do it as follows:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;CALCULATE (
    [Sales Amount],
    FILTER (
        VALUES ( 'Product'[Color] ),
        'Product'[Color] = "Red"
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;As VALUES function does not ignore the outer filter context and CALCULATE&amp;nbsp;filter table will be pre-filtered based on the outer filter context.&lt;BR /&gt;In both cases, the next step would be by replacing the outer filter table with the new filter table "Only for the the column(s) stated inside CALCULATE"&lt;BR /&gt;Now going back to our matrix cell, and let's say that the outer color filter of this cell is "Blue"&amp;nbsp; then:&lt;BR /&gt;- In the first example (using Boolean or ALL), we are starting from ALL colors, then we are filtering only "Red", therefore, the inner filter table now contains only "Red" and the outer contains only "Blue". The inner filter now replaces the outer filter i.e. "Red" replaces "Blue" and we have now only "Red". Then the expression [Sales Amoun] is evaluated filtered to the color "Red" only.&lt;BR /&gt;We can go one step further and ask the engine not to replace the outer filter with the inner filter but to keep it and thus the two filters will be merged together&amp;nbsp;(intersected). This can be achieved using KEEPFILTERS&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;CALCULATE (
    [Sales Amount],
    KEEPFILTERS ( 'Product'[Color] = "Red" )
)&lt;/LI-CODE&gt;
&lt;P&gt;In this case, the outer filter "Blue" will be intersected with the inner filter "Red" and the intersection is just an empty table, thus the expression [Sales Amount] returns blank.&lt;/P&gt;
&lt;P&gt;- In the second example (using VALUES) we are starting from the current filter filter context which contains only "Blue". This table that contains only "Blue" is filters to only "Red" which results in an empty filter table that is then applied over the expression [Sales Amount] and the result would be a blank.&lt;/P&gt;
&lt;P&gt;I don't think so. KEEPFILTERS is a local modifier but that doen't mean it forces the evaluation of the filter argument within the outer filter context. Otherwise, it would be exactly the same as the (VALUES) expression but its not and here is my proof using the very same approach&amp;nbsp;of yours:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 07:52:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3041964#M104381</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-25T07:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3042005#M104383</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;thank you for the compliment, I'm really flattered!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="495487" data-lia-user-login="Zx2000" class="lia-mention lia-mention-user"&gt;Zx2000&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above all, unlike Excel formula, DAX measures are super, super, super ... sensitive to all elements in its evaluation context; literally means, any element&amp;nbsp; (relationship, row/column, slicer ...) does impact on the calculation.&lt;/P&gt;
&lt;P&gt;As for your measure, I can't comment more than just simply it this way now, given that there is no data model available.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;test 1 =
CALCULATE(
    [Sales Amount],
    KEEPFILTERS( 'Product'[Color] = "Red" ),
    ALL( 'Product'[Color] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 08:24:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3042005#M104383</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2023-01-25T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3042983#M104462</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="495487" data-lia-user-login="Zx2000" class="lia-mention lia-mention-user"&gt;Zx2000&lt;/a&gt;&amp;nbsp;First, let me state that trying to learn CALCULATE when first learning DAX is a terrible, terrible idea. In fact, CALCULATE is mostly for suckers who enjoy exploring the ultimate depths of rabbit holes of sadness and despair. 90% or more of the things you can do with CALCULATE you can do without CALCULATE. So, just learn this pattern:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR __Table = 'Table'&lt;/P&gt;
&lt;P&gt;VAR __Table1 = FILTER(__Table, &amp;lt;some filter&amp;gt;)&lt;/P&gt;
&lt;P&gt;VAR __Result = SUMX(__Table1, &amp;lt;some column&amp;gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table, Filter (or group or FILTER and group), X aggregator, done.&lt;/P&gt;
&lt;P&gt;That basic pattern will allow you to solve the vast, vast majority of DAX calculations without ever using CALCULATE. In fact, I am firmly convinced that CALCULATE really only exists to give sweats and try hards a reason to post stupid "what does this crazy CALCULATE formula do" challenges. It's embarrassing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, specific to the question at hand, this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;test 2 = CALCULATE(SUM('Reseller Sales'[SalesAmount]), KEEPFILTERS('Product'[Product Color] = "Red"))&lt;/LI-CODE&gt;
&lt;P&gt;Would return a value for only Red color in the Product table. Other colors would be blank&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;test 3 = CALCULATE(SUM('Reseller Sales'[SalesAmount]), ALL('Product'[Product Color]))&lt;/LI-CODE&gt;
&lt;P&gt;Would return the same sales amount number for all colors and the sales amount would be the total sales amount for all colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;test 1 = CALCULATE(SUM('Reseller Sales'[SalesAmount]), KEEPFILTERS('Product'[Product Color] = "Red"), ALL( 'Product'[Product Color]))&lt;/LI-CODE&gt;
&lt;P&gt;Gets all the colors, then only keeps the color red which means that it will end up with all colors having the same value which will be the total value for Red only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now ask yourself, why do you need that? So that people can write blog articles and books explaining this stupid behavior.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/meh3OkgFYfc" data-video-remote-vid="https://youtu.be/meh3OkgFYfc" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fmeh3OkgFYfc%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dmeh3OkgFYfc&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fmeh3OkgFYfc%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 14:49:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3042983#M104462</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-01-25T14:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3043884#M104561</link>
      <description>&lt;P&gt;Thank You for Your answer, I am a kind of person who still want to understand as much as possible:)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 22:26:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3043884#M104561</guid>
      <dc:creator>Zx2000</dc:creator>
      <dc:date>2023-01-25T22:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3043967#M104572</link>
      <description>&lt;P&gt;&amp;nbsp;Understood, you just have to memorize this from sqlbi then:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CALCULATE evaluation follow these steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;CALCULATE evaluates all the explicit filter arguments in the original evaluation context, each one independently from the others. This includes both the original row contexts (if any) and the original filter context. Once this evaluation is finished, CALCULATE starts building the new filter context.&lt;/LI&gt;
&lt;LI&gt;CALCULATE makes a copy of the original filter context to prepare the new filter context. It discards the original row contexts, because the new evaluation context will not contain any row context.&lt;/LI&gt;
&lt;LI&gt;CALCULATE performs the context transition. It uses the current value of columns in the original row contexts to provide a filter with a unique value for all the columns currently being iterated in the original row contexts. This filter may or may not contain one individual row. There is no guarantee that the new filter context contains a single row at this point. If there are no row contexts active, this step is skipped. Once all implicit filters created by the context transition are applied to the new filter context, CALCULATE moves on to the next step.&lt;/LI&gt;
&lt;LI&gt;CALCULATE evaluates the CALCULATE modifiers used in filter arguments:&lt;SPAN&gt;&amp;nbsp;&lt;A class="" href="https://dax.guide/userelationship/" target="_blank" rel="noopener" data-id="241"&gt;USERELATIONSHIP,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/crossfilter/" target="_blank" rel="noopener" data-id="58"&gt;CROSSFILTER,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/all/" target="_blank" rel="noopener" data-id="20"&gt;ALL,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/allexcept/" target="_blank" rel="noopener" data-id="21"&gt;ALLEXCEPT,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/allselected/" target="_blank" rel="noopener" data-id="23"&gt;ALLSELECTED, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/allnoblankrow/" target="_blank" rel="noopener" data-id="22"&gt;ALLNOBLANKROW. This step happens after step 3. This is very important, because it means that one can remove the effects of the context transition by using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/all/" target="_blank" rel="noopener" data-id="20"&gt;ALL&lt;SPAN&gt;&amp;nbsp;as a filter argument. The CALCULATE modifiers are applied after the context transition, so they can alter the effects of the context transition.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;CALCULATE applies the explicit filter arguments evaluated at 1. to the new filter context generated after step 4. These filter arguments are applied to the new filter context once the context transition has happened so they can overwrite it, after filter removal — their filter is not removed by any&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A class="" href="https://dax.guide/all/" target="_blank" rel="noopener" data-id="20"&gt;ALL* modifier — and after the relationship architecture has been updated. However, the evaluation of filter arguments happens in the original filter context, and it is not affected by any other modifier or filter within the same CALCULATE function. If a filter argument is modified by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A class="" href="https://dax.guide/keepfilters/" target="_blank" rel="noopener" data-id="130"&gt;KEEPFILTERS, the filter is added to the filter context without overwriting existing filters over the same column(s).&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;The filter context generated after point (5) is the new filter context used by CALCULATE in the evaluation of its expression.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dax.guide/calculate/" target="_blank" rel="noopener"&gt;CALCULATE – DAX Guide&lt;/A&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="495487" data-lia-user-login="Zx2000" class="lia-mention lia-mention-user"&gt;Zx2000&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 23:29:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3043967#M104572</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-01-25T23:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3044536#M104605</link>
      <description>&lt;P&gt;I know these steps. I tried to study them hard:) It is not problem to memorize this but to understand. Some points or parts of points without many examples are not understandable for me and many terms used there may be understood in different way in my opinion (4 and especcially 5) . Many times I was sure that i finally understood meaning of these steps but at the end with some particular example (code which gives different result then expected) It turned out that my understanding was incorrect. So every time I tried to understand it once more in a different way&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 08:28:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3044536#M104605</guid>
      <dc:creator>Zx2000</dc:creator>
      <dc:date>2023-01-26T08:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help me understand Calculate steps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3564201#M137399</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alberto in their Mastering DAX course said that KEEPFILTERS is not CALCULATE modifier therefore if there is second argument using ALL then ALL is used first because it is a modifier. Then in one of their page I read that KEEPFILTERS&amp;nbsp;&lt;STRONG&gt;is&lt;/STRONG&gt; CALCULATE modifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So which is it?????????&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 13:30:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-me-understand-Calculate-steps/m-p/3564201#M137399</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-02T13:30:53Z</dc:date>
    </item>
  </channel>
</rss>

