<?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: No CALCULATE Challenge -- Round #2 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189692#M115643</link>
    <description>&lt;P&gt;&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;This is exactly the sort of approach I mentioned above and does not qualify as a full solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;the only way I can think to do it without CALCULATE is remove all filters and specify the ones I want to put back, which requires (as far as I can tell) including within the measure definition any dimension table I ever want to filter or slice on, which is a problem if new dimensions are ever introduced (and probably not great for performance either).&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Sat, 15 Apr 2023 18:45:02 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2023-04-15T18:45:02Z</dc:date>
    <item>
      <title>No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3188914#M115589</link>
      <description>&lt;P&gt;I learned a lot from the brilliant folks who participated in my &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/No-CACULATE-challenge/td-p/3147810" target="_blank" rel="noopener"&gt;previous challenge&lt;/A&gt;, so I wanted to explore another situation where I find CALCULATE highly useful and see how others manage to do without it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this scenario, I want to define a benchmark ratio as the ratio of sales to sales in North American Stores, preserving all filtering other than geography and channel. Using CALCULATE, this is simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Sales Benchmark Ratio = 
VAR _BenchmarkSales =
    CALCULATE (
        [Sales Amount],
        ALL ( Geography ),
        Geography[ContinentName] = "North America",
        ALL ( Channel ),
        Channel[ChannelName] = "Store"
    )
VAR _Ratio = DIVIDE ( [Sales Amount], _BenchmarkSales )
RETURN
    _Ratio&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The challenge is to write a measure without CALCULATE that can reproduce this robustly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of what the values should be with some filters applied:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For full credit, the measure should work regardless of what dimensions are used for slicers and what dimensions are used for rows and columns of the matrix. It should still work even if new dimensions are added to the data model.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Participants from last time:&lt;/P&gt;
&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;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&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;Anonymous&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other friends who might like to join:&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="115827" data-lia-user-login="BA_Pete" class="lia-mention lia-mention-user"&gt;BA_Pete&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="168297" data-lia-user-login="bcdobbs" class="lia-mention lia-mention-user"&gt;bcdobbs&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="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:30:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3188914#M115589</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-14T17:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3188969#M115596</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;Doesn't seem that simple &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;it's 8:15pm right now here and I don't have access to my laptop. I hope not to close the subject until tomorrow same time. I will try to give it a shot anyway from my phone.&amp;nbsp;&lt;BR /&gt;I just wanted to say that even this CALCULATE version of the measure won't work in all scenarios. For example if you have Country as a slicer or if you have any attribute from the Channel table other than Channel Name in the rows, I guess it won't work. So please be nice and grant a little bit of flexibility &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 16:23:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3188969#M115596</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-14T16:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189013#M115599</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;Not the best performance for sure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sales Benchmark Ratio =&lt;BR /&gt;VAR _BenchmarkSales =&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALLSELECTED ( Sales ),&lt;BR /&gt;RELATED ( Geography[ContinentName] ) = "North America"&lt;BR /&gt;&amp;amp;&amp;amp; RELATED ( Channel[ChannelName] ) = "Store"&lt;BR /&gt;),&lt;BR /&gt;Sales[Quantity] * Sales[Price]&lt;BR /&gt;)&lt;BR /&gt;VAR _Ratio =&lt;BR /&gt;DIVIDE ( [Sales Amount], _BenchmarkSales )&lt;BR /&gt;RETURN&lt;BR /&gt;_Ratio&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 16:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189013#M115599</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-14T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189017#M115600</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;- OK, interesting....fair or foul to tinker with the data model and collapse the geography snowflake to simplify?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 16:48:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189017#M115600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189039#M115602</link>
      <description>&lt;P&gt;Collapsing the snowflake to a star schema is fine.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:24:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189039#M115602</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-14T17:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189048#M115603</link>
      <description>&lt;P&gt;Cool, thanks.&amp;nbsp; Would you mind throwing the data file into your original post?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:28:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189048#M115603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T17:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189051#M115604</link>
      <description>&lt;P&gt;Adding a Country slicer doesn't seem to break it as far as I can tell but fair point about the Channel. I didn't use another ALL since there's only one visible column from that table, but I'll go ahead and edit that in.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:29:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189051#M115604</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-14T17:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189059#M115606</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;I don't have the underlying data files, unfortunately. I downloaded it as a PBIX. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 17:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189059#M115606</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-14T17:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189230#M115612</link>
      <description>&lt;P&gt;Inspiring way addressing this tricky chanllenge; but I'm afraid&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FILTER(
    ALLSELECTED( Sales ),
    RELATED( Geography[ContinentName] ) = "North America"
        &amp;amp;&amp;amp; RELATED( Channel[ChannelName] ) = "Store"
)&lt;/LI-CODE&gt;
&lt;P&gt;would produce an empty table because there exist an external slicers Channel[ChannelName] and Geography[ContinentName]; when&amp;nbsp;Channel[ChannelName]&amp;lt;&amp;gt;"Store" or Geography[ContinentName]&amp;lt;&amp;gt;"North America" are selected, the filtered table is empty.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 20:46:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189230#M115612</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2023-04-14T20:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189241#M115613</link>
      <description>&lt;P&gt;Interesting challenge&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&amp;nbsp;Looking forward to some tricky solutions as I've already spent more than half hour but no luck. I really doubt there exists an elegant, error-proof alternative, especially when some new slicers will intervene.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Off the track comment on CALCULATE&lt;/P&gt;
&lt;P&gt;I admit that the idea to kick the ass of CALCUALTION is buzzy at the first glance; but with further comprehension of DAX, I'd like to say the mechanism of context transition triggered by CALCULATE is a genius one! It differentiates DAX from other traditional "context insensitive" lauguages like Excel formulas, SQL etc.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 21:15:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189241#M115613</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2023-04-14T21:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189603#M115631</link>
      <description>&lt;P&gt;Yeah, this example demonstrates what I consider the most important use case for CALCULATE -- modifying filter context in a simple and precise way that works in almost any context without needing revision. One can write a measure without CALCULATE that works for a specific visual but if it can't reliably be reused in other contexts, we're back to the bad old days of SSRS where we often need separate queries for each visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much of my day-to-day work is building and maintaining common data models that feed dozens of thin reports&amp;nbsp; (I don't know in advance every possible context that each measure will be used) and this type of situation (where just one or two filters need to be removed or adjusted) comes up frequently with benchmarks and the only way I can think to do it without CALCULATE is remove all filters and specify the ones I want to put back, which requires (as far as I can tell) including within the measure definition any dimension table I ever want to filter or slice on, which is a problem if new dimensions are ever introduced (and probably not great for performance either).&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 14:48:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189603#M115631</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-15T14:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189650#M115636</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;Technically meets the letter of the law with regard to the challenge. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales Benchmark Ratio NC Cheat = 
VAR _BenchmarkSalesTable =
    CALCULATETABLE(
        'Sales',
        ALL ( Geography ),
        Geography[ContinentName] = "North America",
        Channel[ChannelName] = "Store"
    )
VAR _Ratio = DIVIDE ( [Sales Amount 1], SUMX(_BenchmarkSalesTable,[SalesAmount]) )
RETURN
    _Ratio&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 16:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189650#M115636</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-04-15T16:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189673#M115640</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;This one works but is slow. Sharing it in case someone has a brilliant idea on how to optimize&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales Benchmark Ratio NC2 = 
    VAR __Products = DISTINCT('Product'[ProductKey])
    VAR __Promotions = DISTINCT(Promotion[PromotionKey])
    VAR __GeoKeys = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Geography'), [ContinentName] = "North America"), "GeoKey",[GeographyKey]))
    VAR __Stores = DISTINCT(SELECTCOLUMNS(FILTER(ALL(Stores), [GeographyKey] IN __GeoKeys),"StoreKey",[StoreKey]))
    VAR __Channels = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Channel'), [ChannelName] = "Store"),"ChannelKey",[Channel]))
    VAR __BenchmarkSalesTable = 
        FILTER(
            FILTER(
                FILTER(
                    FILTER(
                        ALL('Sales'),
                        [ProductKey] IN __Products
                    ),
                    [PromotionKey] IN __Promotions
                ),
                [StoreKey] IN __Stores
            ),
            [channelKey] IN __Channels
        )
    VAR __BenchmarkSales = SUMX(__BenchmarkSalesTable, [SalesAmount])
    VAR __Ratio = DIVIDE ( [Sales Amount 1], __BenchmarkSales )
RETURN
    __Ratio&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 15 Apr 2023 17:29:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189673#M115640</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-04-15T17:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189675#M115642</link>
      <description>&lt;P&gt;&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;/P&gt;
&lt;P&gt;&lt;EM&gt;"&lt;SPAN&gt;It should still work even if new dimensions are added to the data model."&lt;/SPAN&gt;&lt;/EM&gt;&amp;nbsp;said&amp;nbsp;&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;</description>
      <pubDate>Sat, 15 Apr 2023 18:07:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189675#M115642</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-15T18:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189692#M115643</link>
      <description>&lt;P&gt;&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;This is exactly the sort of approach I mentioned above and does not qualify as a full solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;the only way I can think to do it without CALCULATE is remove all filters and specify the ones I want to put back, which requires (as far as I can tell) including within the measure definition any dimension table I ever want to filter or slice on, which is a problem if new dimensions are ever introduced (and probably not great for performance either).&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sat, 15 Apr 2023 18:45:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189692#M115643</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-15T18:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189714#M115648</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;Understood but first step is to at least get something that returns the same values under the same conditions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, not to get all nerdy but your calculation can't guarantee that adding additional dimensions will not break the calculation either. For example, if I add a GeographyType dimension and wire it to the Geography table and add the necessary rows for Stores, for example, a store tied to geography code 422 which is a State/Province and a Sales fact row for that Store then your calculation would always include that store row even when I specifically filter out State/Province in a slicer. So it's kind of a bogus requirement that the No CALCULATE version has to be better than the CALCULATE version.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 19:56:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189714#M115648</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-04-15T19:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189809#M115659</link>
      <description>&lt;P&gt;&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;Got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The requirement is that it has to be &lt;EM&gt;as&lt;/EM&gt; good. It's a fair point that there are ways you could modify the model that would cause problems and it's not reasonable to try to protect against any possible change. For the sake of concreteness, let's suppose a user creates a new dimension table Dim_Quantity with a relationship to Sales[SalesQuantity] for the purpose of bucketing sales into Small/Medium/Large orders. This is the sort of thing I need to be robust against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As it turns out, you don't even need to change the model at all for your suggestion to break down. Try adding a slicer for the existing column Sales[SalesQuantity] to the page and set the filter range to 100-200. This will affect your numerator but not your denominator due to ALL(Sales) and isn't easily remedied by changing this to ALLSELECTED(Sales).&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2023 00:50:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189809#M115659</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-04-16T00:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189925#M115668</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;Great challenge, but because of the requirement I don't think it is possible to make the solution dynamic, so CALCULATE wins, Yay!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise with the current status of the report I would write this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales Benchmark Ratio 2 = 
VAR SalesAmount = [Sales Amount]
VAR _BenchmarkSales = 
    FILTER ( 
        ALL ( Sales ),
        RELATED ( Geography[ContinentName] ) = "North America"
            &amp;amp;&amp;amp; RELATED ( Channel[ChannelName] ) = "Store"
            &amp;amp;&amp;amp; RELATED ( 'Product'[ClassName] ) IN VALUES ( 'Product'[ClassName] )
            &amp;amp;&amp;amp; RELATED ( Promotion[DiscountPercent] ) IN VALUES ( Promotion[DiscountPercent] )
    )
VAR Result = 
    DIVIDE ( 
        SalesAmount, 
        SUMX ( _BenchmarkSales, Sales[SalesAmount] ) 
    )
RETURN Result&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 Apr 2023 08:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3189925#M115668</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2023-04-16T08:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3190817#M115710</link>
      <description>&lt;P&gt;Expanding on this logic. I think one solutions would be to use functions such as&amp;nbsp; NATURALINNERJOIN to create a similar table and then use SUMX. This was my first instinct when looking at this (assuming CALCULATETABLE is also forbidden). Otherwise, your solution should be the best.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 07:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3190817#M115710</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2023-04-17T07:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: No CALCULATE Challenge -- Round #2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3194546#M115938</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;This one is as good, cheats as little as possible and is reasonably fast.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales Benchmark Ratio NC3 = 
    VAR __GeoKeys = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Geography'), [ContinentName] = "North America"), "GeoKey",[GeographyKey]))
    VAR __Stores = DISTINCT(SELECTCOLUMNS(FILTER(ALL(Stores), [GeographyKey] IN __GeoKeys),"StoreKey",[StoreKey]))
    VAR __Channels = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Channel'), [ChannelName] = "Store"),"ChannelKey",[Channel]))
    VAR __BST = 
        CALCULATETABLE (
            'Sales',
            REMOVEFILTERS('Geography'),
            REMOVEFILTERS('Channel')
        )
    VAR __BenchmarkSalesTable = 
        FILTER(
            FILTER(
                __BST,
                [StoreKey] IN __Stores
            ),
            [channelKey] IN __Channels
        )
    VAR __BenchmarkSales = SUMX(__BenchmarkSalesTable, [SalesAmount])
    VAR __Ratio = DIVIDE ( [Sales Amount], __BenchmarkSales )
RETURN
    __Ratio&lt;/LI-CODE&gt;
&lt;P&gt;The real issue is that the REMOVEFILTERS function only works within CALCULATE or CALCULATETABLE, which; in theory, I don't exactly see why it couldn't just stand on its own like ALLEXCEPT and return a table&amp;nbsp; or work within a FILTER function. Kind of goes back to that CALCULATE fixation where special functions are engineered to specifically only work with CALCULATE because it's such a powerful function that it needs special functions written spefically for it just so it can do its job...&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 21:50:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/No-CALCULATE-Challenge-Round-2/m-p/3194546#M115938</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-04-18T21:50:37Z</dc:date>
    </item>
  </channel>
</rss>

