<?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: Dax measure impacting external filter context not able to figure out why it is happening in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1734223#M35985</link>
    <description>&lt;P&gt;The easiest way to make it right is to liquidate the snowflake schema and flatten the two tables, Product Category and Product Subcategory, into one. With snowflakes one has to be careful when writing DAX. If you have a pure star schema, life is soooooo much simpler! As will be your DAX. Please bring categories and subcategories into one table and the issues will be gone, your DAX will be simpler and faster. What's more, you'll be able to create a hierarchy that will make it easier to pick fields that should be related and in a set arrangement.&lt;/P&gt;</description>
    <pubDate>Sat, 20 Mar 2021 14:08:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-03-20T14:08:50Z</dc:date>
    <item>
      <title>Dax measure impacting external filter context not able to figure out why it is happening</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1730476#M35804</link>
      <description>&lt;P&gt;Dear Dax Gurus ,&lt;BR /&gt;&lt;BR /&gt;Thank you if any guru can share some light to uncover this problem . .&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;I understand that External filters as coming from GUI&amp;nbsp; report can imact the measure value . &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;However in this case it appears that reverse is happending in this case&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;When I use the measure as below I see that all my subategories are getting messed up that is incorrect subcategories get displayed under respective categories. I would be thankful if you can explain for each of the measure .&lt;BR /&gt;&lt;BR /&gt;In both the measure , same problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to PBIX for investigation : &lt;A href="https://www.dropbox.com/s/rmvqurnkwvxo6ob/ContosoDW2.pbix?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/rmvqurnkwvxo6ob/ContosoDW2.pbix?dl=0&lt;/A&gt;&lt;BR /&gt;Measure used :&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;Measure:
ComputerSalesWithoutFilters = CALCULATE(sum('Online Sales'[SalesAmount]),'Product Category'[Category]="Computers")
ComputerSalesSame = CALCULATE(sum('Online Sales'[SalesAmount]),(All('Product')),'Product Category'[Category]="Computers")
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt; :&lt;BR /&gt;Subcatetories in the below matrix gets messed up when I use above measure , if i don't then subcategories are displayed correctly.&lt;BR /&gt;&lt;BR /&gt;When first measure ComputerSalesWithoutFilters is used , then all computer subcategories appears in each of the categories.&lt;BR /&gt;When 2nd measure ComputerSalesSame is used all subcategories no matter if they match category, comes under each subcategories&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Mar 2021 12:05:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1730476#M35804</guid>
      <dc:creator>dhrubojtg</dc:creator>
      <dc:date>2021-03-18T12:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dax measure impacting external filter context not able to figure out why it is happening</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1730689#M35817</link>
      <description>&lt;P&gt;ALL( 'Product' ) under your CALCULATE simply removes all filters from Product. ALL in this context does not return a table as you might think. It REMOVES all filters from the table. Additionally, 'Product' in your measure is treated as an expanded table, so it removes also all filters from tables that are joined to 'Product' and are on the one-side of the relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To understand the code one has to understand the theory of expanded tables in DAX. I'd start reading a book by Marco Russo and Alberto Ferrari -&amp;nbsp; "The Definitive Guide to DAX."&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 13:55:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1730689#M35817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-18T13:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dax measure impacting external filter context not able to figure out why it is happening</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1731136#M35856</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;By that same token even in the first measure&lt;BR /&gt;There is one implicit All inserted by DAX for product category[category]column&amp;nbsp; and on the one side we have subcategory table , So Same result should have com in below measure as well (First screenshot)&lt;BR /&gt;But in the first measure , i see only computer subcategory is being displayed across all category&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 17:20:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1731136#M35856</guid>
      <dc:creator>dhrubojtg</dc:creator>
      <dc:date>2021-03-18T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dax measure impacting external filter context not able to figure out why it is happening</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1734223#M35985</link>
      <description>&lt;P&gt;The easiest way to make it right is to liquidate the snowflake schema and flatten the two tables, Product Category and Product Subcategory, into one. With snowflakes one has to be careful when writing DAX. If you have a pure star schema, life is soooooo much simpler! As will be your DAX. Please bring categories and subcategories into one table and the issues will be gone, your DAX will be simpler and faster. What's more, you'll be able to create a hierarchy that will make it easier to pick fields that should be related and in a set arrangement.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 14:08:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-measure-impacting-external-filter-context-not-able-to-figure/m-p/1734223#M35985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-20T14:08:50Z</dc:date>
    </item>
  </channel>
</rss>

