<?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: Speed up PRODUCTX on FILTER ALLSELECTED in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1139458#M17043</link>
    <description>&lt;P&gt;Thank you, that makes sense! &lt;FONT color="#FF9900"&gt;Not quite there yet&lt;/FONT&gt;. When I implement your solution (see code below), all selected factors show show up in the visual as having teh same value (the sum, see attached image). In my original, slow solution, individual factors selected showed up as individual lines.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;CUMULATIVE_AXIOMA = &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;var __currentDate = MAX ( AxiomaReturns_Master[Date] )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;PRODUCTX (&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AxiomaReturns_Master,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ReturnPrepared]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;KEEPFILTERS(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;AxiomaReturns_Master[Date] &amp;lt;= __currentDate&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;ALLSELECTED ( AxiomaReturns_Master )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;) - 1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 16:20:00 GMT</pubDate>
    <dc:creator>IK_TIM</dc:creator>
    <dc:date>2020-06-03T16:20:00Z</dc:date>
    <item>
      <title>Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137088#M16981</link>
      <description>&lt;P&gt;I have a table of 3 columns (date, factor, return) and about 1.5 mil rows. I need to calc cumulative return in user-selected date range, for user-selected group of factors. My query gets soooo slow... How can I speed it up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CUMULATIVE_RETURN = CALCULATE ( PRODUCTX(Returns_Master, [Return]/100 + 1 ),FILTER(ALLSELECTED(Returns_Master[Date]), Returns_Master[Date] &amp;lt;= MAX(Returns_Master[Date]))) - 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jun 2020 20:48:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137088#M16981</guid>
      <dc:creator>IK_TIM</dc:creator>
      <dc:date>2020-06-02T20:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137113#M16982</link>
      <description>&lt;P&gt;Storing the max date as a variable might help so you only need to compute it once. See if this helps at all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CUMULATIVE_RETURN =
VAR MaxDate = MAX ( Returns_Master[Date] )
RETURN
    CALCULATE (
        PRODUCTX ( Returns_Master, [Return] / 100 + 1 ),
        ALLSELECTED ( Returns_Master[Date] ),
        Returns_Master[Date] &amp;lt;= MaxDate
    ) - 1&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:05:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137113#M16982</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2020-06-02T21:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137125#M16983</link>
      <description>&lt;P&gt;First, you should create a column (in Power Query, not in DAX!) that's equal to&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Returns_Master[Factor] = Returns_Master[Return] / 100 + 1&lt;/LI-CODE&gt;
&lt;P&gt;Then you can write&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;CUMULATIVE_RETURN =
var __currentDate = MAX ( Returns_Master[Date] )
return
CALCULATE (
    PRODUCTX (
    	Returns_Master,
    	Returns_Master[Factor]
    ),
    KEEPFILTERS( 
    	Returns_Master[Date] &amp;lt;= __currentDate 
    ),
    ALLSELECTED ( Returns_Master )
) - 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:13:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1137125#M16983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-02T21:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1139429#M17042</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1139429#M17042</guid>
      <dc:creator>IK_TIM</dc:creator>
      <dc:date>2020-06-03T16:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1139458#M17043</link>
      <description>&lt;P&gt;Thank you, that makes sense! &lt;FONT color="#FF9900"&gt;Not quite there yet&lt;/FONT&gt;. When I implement your solution (see code below), all selected factors show show up in the visual as having teh same value (the sum, see attached image). In my original, slow solution, individual factors selected showed up as individual lines.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;CUMULATIVE_AXIOMA = &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;var __currentDate = MAX ( AxiomaReturns_Master[Date] )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;PRODUCTX (&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AxiomaReturns_Master,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ReturnPrepared]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;KEEPFILTERS(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;AxiomaReturns_Master[Date] &amp;lt;= __currentDate&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;ALLSELECTED ( AxiomaReturns_Master )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;) - 1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:20:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1139458#M17043</guid>
      <dc:creator>IK_TIM</dc:creator>
      <dc:date>2020-06-03T16:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140131#M17056</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;ALLSELECTED ( AxiomaReturns_Master ) part makes it so that the Factors cannot be distinguished.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You don't want that on the whole table but it should be OK just on the date column. I'd probably write it without the KEEPFILTERS function, personally.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CUMULATIVE_AXIOMA =
VAR __currentDate = MAX ( AxiomaReturns_Master[Date] )
RETURN
    CALCULATE (
        PRODUCTX ( AxiomaReturns_Master, AxiomaReturns_Master[ReturnPrepared] ),
        ALLSELECTED ( AxiomaReturns_Master[Date] ),
        AxiomaReturns_Master[Date] &amp;lt;= __currentDate
    ) - 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 22:31:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140131#M17056</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2020-06-03T22:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140271#M17059</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just put&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;ALLSELECTED ( AxiomaReturns_Master[Date] ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the formula and you don't put a filter directly on the Date column (but put it on, say, Month), you'll get a wrong result. This is because ALLSELECTED with just a column does nothing if there's no (shadow) filter on the column (the column is not being iterated).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, KEEPFILTERS is needed in case there's a (shadow) filter on a column different than Date, which can easily happen if a visual just shows months/weeks/quarters/semesters/years. So, a combination of ALLSELECTED( 'Table'[Column] ) and no KEEPFILTERS will not work correctly in all conditions, only is some special ones which you can't guarantee will be in force all the time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;EDIT: I do understand what you meant now.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I don't understand this statement of yours: "&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED ( AxiomaReturns_Master ) part makes it so that the Factors cannot be distinguished."&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;EDIT: The below, however, still stands.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ALLSELECTED( 'Table' ) does nothing else than just keeping all shadow filters on the table, if there are any (meaning at least one iteration happens on some column(s)), and gives you all the rows of the table that are visible during an iteration; if there's no iteration happening, it returns all the rows visible in the current context.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 01:31:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140271#M17059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T01:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140286#M17061</link>
      <description>OK. I know why you get one graph instead of two different for 2 different factors. This is because your model is incorrect. It's not the measure that is, it's THE MODEL.&lt;BR /&gt;&lt;BR /&gt;You have to create correct fact tables and correct dimensions. Currently, you're mixing those things and therefore it'll be next to impossible to write measures that will be behaving correctly in all circumstances.&lt;BR /&gt;&lt;BR /&gt;Please re-factor your model into a proper star schema.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 04 Jun 2020 01:29:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140286#M17061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T01:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140439#M17063</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;OK. I know why you get one graph instead of two different for 2 different factors. This is because your model is incorrect. It's not the measure that is, it's THE MODEL.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Anonymous&lt;/a&gt;, this is a bit extreme. Denormalized tables can be easier to understand and work with depending on the situation, especially for beginners. I don't think it's fair to say the model is definitively "incorrect" in this case, even though having a separate date table is nearly always a good idea.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If OP were using other parts of the Date hierarchy, then yes, those would have to be dealt with appropriately but since the date table, the dimension table, and the fact table are all rolled into one, measures have to be written paying attention to individual columns rather than removing filters on the entire table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN&gt;ALLSELECTED( 'Table' ) does nothing else than just keeping all shadow filters on the table, if there are any (meaning at least one iteration happens on some column(s)), and gives you all the rows of the table that are visible during an iteration; if there's no iteration happening, it returns all the rows visible in the current context.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't agree with this. Specifically, ALLSELECTED does &lt;EM&gt;not&lt;/EM&gt; return "all rows visible in the current context". The evaluation context includes context from slicers and filters&amp;nbsp;&lt;EM&gt;as well as&lt;/EM&gt; filter context produced by the visual.&amp;nbsp; ALLSELECTED removes the filter context generated by the visual (but still respects slicers), This is why the Factors aren't separated into individual lines when inserted into the Legend box.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 02:37:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140439#M17063</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2020-06-04T02:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140532#M17066</link>
      <description>&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Please read this to know what I'm talking about:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/" target="_blank"&gt;https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;because it does seem you don't fully understand how ALLSELECTED works. It's not an attack on you. This function is COMPLEX and there are not many people in this world that do understand its true internal workings. And to do, you have to know about shadow filter contexts. But the behavior of it is different when you use it with a column, with a table and without any argument. Very different.&lt;BR /&gt;&lt;BR /&gt;The model is technically not incorrect but it's functionally incorrect and does not follow Best Practices. Calculating on such models is cumbersome and measures will have to be updated if attributes are added to the model later. You don't want to do this if you want to be professional. If the model is correct, you write a measure and IT WORKS IN ALL CIRCUMSTANCES. This is the difference between a bad and a good model. In a word, it does not matter what your level is: you have to build correct models if you want to "survive." Just as you have to build correct measures. What's the use of a measure that only sometimes gives you the right answer? If somebody wrote a measure like this for me in production, they wouldn't last long...&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 04 Jun 2020 03:35:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1140532#M17066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T03:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142133#M17123</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Thanks for the link. It's good to review that and indeed I was not completely technically correct with how I explained it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be a bit more precise, in &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="168102" data-lia-user-login="IK_TIM" class="lia-mention lia-mention-user"&gt;IK_TIM&lt;/a&gt;'s last posted measure, ALLSELECTED (&amp;nbsp;AxiomaReturns_Master ) removes the Factor filter context generated by the visual's Legend and restores the shadow filter context (from the slicers) whereas we only want to remove date-related filter context for the measure to function as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;A href="https://dax.guide/allselected/" target="_blank"&gt;ALLSELECTED&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;operates in a similar way to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/all/" target="_blank"&gt;ALL&lt;/A&gt;&lt;SPAN&gt;, which removes corresponding filters from the filter context when used as a&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/calculate/" target="_blank"&gt;CALCULATE&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;modifier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Since ALLSELECTED isn't used inside an iterator within the measure, it's behavior isn't terribly complex here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;SPAN&gt;What we typically teach users during our trainings is to use&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/allselected/" target="_blank"&gt;ALLSELECTED&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;to retrieve the query context – that is, the context under which a pivot table or a report is executed – if and only if no iteration is happening.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 04 Jun 2020 14:39:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142133#M17123</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2020-06-04T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142333#M17130</link>
      <description>And this is precisely why you need to have A CORRECT MODEL in the first place.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 04 Jun 2020 15:43:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142333#M17130</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T15:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142340#M17131</link>
      <description>By the way... Each and every visual DOES generate an iteration (even if you can't see it in the measure), so technically you're not correct, either. There always IS an iteration and therefore ALLSELECTED does have a role to play. A BIG ROLE.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 04 Jun 2020 15:45:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142340#M17131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T15:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up PRODUCTX on FILTER ALLSELECTED</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142505#M17136</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;By the way... Each and every visual DOES generate an iteration (even if you can't see it in the measure), so technically you're not correct, either. There always IS an iteration and therefore ALLSELECTED does have a role to play. A BIG ROLE.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's exactly why I specified "&lt;SPAN&gt;within the measure" in my sentence and why the statement "ALLSELECTED( 'Table' ) does nothing else than just keeping all shadow filters on the table" is misleading.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:38:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Speed-up-PRODUCTX-on-FILTER-ALLSELECTED/m-p/1142505#M17136</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2020-06-04T16:38:12Z</dc:date>
    </item>
  </channel>
</rss>

