<?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: ALL function on a specific column not working like I think it should in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3981627#M154389</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your filter context is created on the page, but please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#Sales_WARRANTIES =
CALCULATE (
    COUNT ( 'SalesData'[Date_Sale] ),
    KEEPFILTERS ( FILTER ( ALL ( 'SalesData' ), 'SalesData'[WarrantyY/N] = "Y" ) )
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 09 Jun 2024 05:06:20 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2024-06-09T05:06:20Z</dc:date>
    <item>
      <title>ALL function on a specific column not working like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3981518#M154388</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table of SalesData which contains mainly normal sales transactions but some Warranty sales as well. I flag if the sale is a warranty or not in the WarrantyY/N column. I generally want to exclude warranty sales so I have a filter on all pages where WarrantyY/N = "N".&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there are a few places where I still want to specifically show how many warranty sales there were, so I am looking for a measure to count the warranty sales transactions by ignoring the existing WarrantyY/N = "N" filter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Perhaps I am understanding the ALL function wrong, but my current understanding is the ALL function when used on a specific column strips all filters on that column. Below is what I thought would work. I've tried a few iterations with using FILTER but same results. The visual counts warranties correctly with no other filters are on the WarrrantyY/N column, but if I apply a filter to equal "N", the visual blanks out, i.e. not stripping the filters. Again, I though the ALL function would ignor this page level filter.&amp;nbsp;&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;#Sales_WARRANTIES = 
    CALCULATE ( 
        COUNT ( 'SalesData'[Date_Sale] ), 
        ALL ( 'SalesData'[WarrantyY/N] ),
        'SalesData'[WarrantyY/N] = "Y"
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I asked Copilot, and it also recommended the above solution.&lt;BR /&gt;&lt;BR /&gt;There are some other page level filters, both from other columns in the SalesData table as wells as from related Dim tables if that makes a difference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 00:42:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3981518#M154388</guid>
      <dc:creator>beanboy</dc:creator>
      <dc:date>2024-06-09T00:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: ALL function on a specific column not working like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3981627#M154389</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your filter context is created on the page, but please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#Sales_WARRANTIES =
CALCULATE (
    COUNT ( 'SalesData'[Date_Sale] ),
    KEEPFILTERS ( FILTER ( ALL ( 'SalesData' ), 'SalesData'[WarrantyY/N] = "Y" ) )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 09 Jun 2024 05:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3981627#M154389</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-06-09T05:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: ALL function on a specific column not working like I think it should</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3982050#M154402</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="666800" data-lia-user-login="beanboy" class="lia-mention lia-mention-user"&gt;beanboy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you apply sort by column to the WarrantyY/N field? If so, please add the sort&amp;nbsp;reference field to the ALL function as well, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ALL(WarrantyY/N, WarrantyY/N Index)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a side effect of the sort by column feature, which adds filtering of the sort reference field to the current&amp;nbsp;&lt;SPAN&gt;context.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a demonstration of that side effect:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without using sort by columns, the ALL function gives the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After using sort by column, the results of the ALL function start to look strange.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And,&amp;nbsp;add the sort&amp;nbsp;reference field to the ALL function as well, the result returned to normal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 16:59:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ALL-function-on-a-specific-column-not-working-like-I-think-it/m-p/3982050#M154402</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-06-09T16:59:14Z</dc:date>
    </item>
  </channel>
</rss>

