<?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 Suddenly Can't Filter in Measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426116#M64434</link>
    <description>&lt;P&gt;All of a sudden the filtered value in measures don't work.&lt;/P&gt;&lt;P&gt;I made a fresh dataset with one table to test it. The result is the same whether I use a quick measure or not. I have been using this format for over 2 years, and this is the first time this happened.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 07:58:42 GMT</pubDate>
    <dc:creator>rusgesig</dc:creator>
    <dc:date>2022-03-30T07:58:42Z</dc:date>
    <item>
      <title>Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426116#M64434</link>
      <description>&lt;P&gt;All of a sudden the filtered value in measures don't work.&lt;/P&gt;&lt;P&gt;I made a fresh dataset with one table to test it. The result is the same whether I use a quick measure or not. I have been using this format for over 2 years, and this is the first time this happened.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 07:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426116#M64434</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-03-30T07:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426155#M64436</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try&lt;/P&gt;&lt;P&gt;Count of id for Active =&lt;BR /&gt;CALCULATE ( DISTINCTCOUNT ( table[id] ), "Active" IN table[status] )&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 08:11:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426155#M64436</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-30T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426195#M64441</link>
      <description>&lt;P&gt;This works, still really weird that the previous format stopped working - am I going to have go through old datasets to amend the measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;active = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;('&lt;/SPAN&gt;&lt;SPAN&gt;table'[date_active]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'table'[status]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Active"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_calendar[reldate]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'table'[date_active]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Mar 2022 08:33:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426195#M64441</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-03-30T08:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426241#M64443</link>
      <description>&lt;P&gt;A function 'CONTAINSROW' has been used in a True/False expression that is used as a table filter expression. This is not allowed.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 08:46:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426241#M64443</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-03-30T08:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426257#M64444</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Count of id for Active =
CALCULATE (
    DISTINCTCOUNT ( table[id] ),
    FILTER ( table, "Active" IN table[status] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 08:56:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426257#M64444</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-30T08:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426306#M64445</link>
      <description>&lt;P&gt;Yes, I said that works in my second post - my question is why the previous format stopped working all of a sudden?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 09:12:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2426306#M64445</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-03-30T09:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2434775#M64943</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this is a syntax error and not correct.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;And I don't think there's anything wrong with your first writing,&amp;nbsp;But generally if there is only one choice, we can directly use 'table'[status] = "Active"'&amp;nbsp;as you mentioned later.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I suspect that your matrix table has columns from other tables affecting the results.&amp;nbsp;Can you add more information?&amp;nbsp;What's the difference between your desired result and the current result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Janey&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 07:43:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2434775#M64943</guid>
      <dc:creator>v-janeyg-msft</dc:creator>
      <dc:date>2022-04-04T07:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2437463#M65104</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I brought this table into a new dataset for testing purposes. This is the only table in the dataset.&lt;BR /&gt;The desired result for the measure should be the same as 'Count of id' where the status in rows is 'Active'.&lt;BR /&gt;&lt;BR /&gt;Like I explained before, I've been using this syntax for over 2 years and all of a sudden it's showing the same result for all statuses, when the measure should be filtering one status only. The total is correct but not per status.&lt;BR /&gt;&lt;BR /&gt;As previously mentioned, this measure returns the correct result:&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;active =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;COUNTA('table'[date_active])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;,FILTER('table','table'[status]&amp;nbsp;=&amp;nbsp;"Active")&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;,USERELATIONSHIP(_calendar[reldate],'table'[date_active]))&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 07:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2437463#M65104</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-04-05T07:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440282#M65296</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide a sample where the result is wrong?&amp;nbsp;I can't see the problem without specific context.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 10:02:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440282#M65296</guid>
      <dc:creator>v-janeyg-msft</dc:creator>
      <dc:date>2022-04-06T10:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440302#M65298</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If you look at the measure, the count should be restricted to where 'status' is in 'Active', however it shows the 'Active' count for all values in 'status' even though it should be '0' for everything not in Active.&lt;BR /&gt;&lt;BR /&gt;This is a simple count with a single filter - the filter doesn't apply correctly - don't know what else to provide in terms of context.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 10:11:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440302#M65298</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-04-06T10:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440351#M65299</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you may try&lt;/P&gt;&lt;P&gt;Count of id for Active =&lt;BR /&gt;IF (&lt;BR /&gt;SELECTEDVALUE ( 'table'[status] ) = "Active",&lt;BR /&gt;DISTINCTCOUNT ( 'table'[id] )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 10:30:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440351#M65299</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-06T10:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440469#M65305</link>
      <description>&lt;P&gt;The problem is not finding a measure that works, it's why the syntax I have been using for years does not work anymore.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 11:11:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440469#M65305</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-04-06T11:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440978#M65343</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, it is doing what is supposed to do. It us replacing the filter on "Status" with the value "Active" as expected. Why do you think it should filter the visual?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 14:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440978#M65343</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-06T14:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440998#M65345</link>
      <description>&lt;P&gt;Because it used to.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 14:29:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2440998#M65345</guid>
      <dc:creator>rusgesig</dc:creator>
      <dc:date>2022-04-06T14:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2441125#M65353</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I'm not sure if I understand. This is just an alternative way as DISTINCTCOUNT is not as effcient..I've read.&lt;/P&gt;&lt;P&gt;Table ID Active Count = CALCULATE(&lt;/P&gt;&lt;P&gt;COUNTROWS ( DISTINCT ( Table[ID] ),&lt;BR /&gt;FILTER(ALL(Table[Status]), Table[Status] = "Active")&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 15:16:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2441125#M65353</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-04-06T15:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2441175#M65360</link>
      <description>&lt;P&gt;The golden rule of DAX programming: &lt;STRONG&gt;You should never filter a whole table if you can filter a column&lt;/STRONG&gt;. If you do, you'll be in trouble sooner rather than later. In DAX, the fact that something works today does not guarantee it'll work tomorrow if you don't know what DAX really does under the hood.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Your Measure] =
calculate(
    distinctcount( 'table'[id] ),
    keepfilters( -- this is CRUCIAL for filter intersection!
        'table'[status] = "active"
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 15:39:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2441175#M65360</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-04-06T15:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Suddenly Can't Filter in Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2443697#M65513</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203124" data-lia-user-login="rusgesig" class="lia-mention lia-mention-user"&gt;rusgesig&lt;/a&gt;&amp;nbsp;&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="349489" data-lia-user-login="daXtreme" class="lia-mention lia-mention-user"&gt;daXtreme&lt;/a&gt;&amp;nbsp;'s right, this question is difficult to explain, in short, using filter(table,[column]="xxx") in the parameters of calculate() is much safer than using [column]="xxx" directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Janey&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 14:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suddenly-Can-t-Filter-in-Measures/m-p/2443697#M65513</guid>
      <dc:creator>v-janeyg-msft</dc:creator>
      <dc:date>2022-04-07T14:01:50Z</dc:date>
    </item>
  </channel>
</rss>

