<?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 too Slow with Filtering in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3532775#M135751</link>
    <description>&lt;P&gt;Thanks but that doesn't help.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 10:50:41 GMT</pubDate>
    <dc:creator>zazaalaza</dc:creator>
    <dc:date>2023-11-14T10:50:41Z</dc:date>
    <item>
      <title>DAX too Slow with Filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3531105#M135671</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the following measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
    CALCULATE ( 
        COUNT ( 'Table'[Value] ), 
        FILTER ( 
            ALL ( 'Table' ), 
            'Table'[ValidFromDate] &amp;lt; MAX ( 'Date'[Date] ) &amp;amp;&amp;amp; 
            'Table'[ValidToDate] &amp;gt; MAX ( 'Date'[Date] ) 
        ) 
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;The two tables (Table, Date) are not connected.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I use this to see "Active" contracts on a specific date. However when I place it in a visual to see it on a daily basis (last 12 months for example), it is way too slow (I have 12 million rows).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there a way to optimize this?&lt;BR /&gt;Much appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 16:08:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3531105#M135671</guid>
      <dc:creator>zazaalaza</dc:creator>
      <dc:date>2023-11-13T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: DAX too Slow with Filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3531118#M135673</link>
      <description>&lt;P&gt;It might help to make the max date a variable.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Measure =
VAR _MaxDate = MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        COUNT ( 'Table'[Value] ),
        ALL ( 'Table' ),
        'Table'[ValidFromDate] &amp;lt; _MaxDate,
        'Table'[ValidToDate] &amp;gt; _MaxDate
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Nov 2023 16:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3531118#M135673</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-11-13T16:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX too Slow with Filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3532775#M135751</link>
      <description>&lt;P&gt;Thanks but that doesn't help.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 10:50:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3532775#M135751</guid>
      <dc:creator>zazaalaza</dc:creator>
      <dc:date>2023-11-14T10:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: DAX too Slow with Filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3532777#M135752</link>
      <description>&lt;P&gt;Perhaps there is a way to make it faster without using Calculate?&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;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 10:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3532777#M135752</guid>
      <dc:creator>zazaalaza</dc:creator>
      <dc:date>2023-11-14T10:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX too Slow with Filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3533617#M135782</link>
      <description>&lt;P&gt;Yeah, I have seen this pattern be slow occasionally.&lt;BR /&gt;&lt;BR /&gt;Without CALCULATE can be written fairly similarly.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Measure =
VAR _MaxDate = MAX ( 'Date'[Date] )
RETURN
    COUNTROWS (
        FILTER (
            ALL ( 'Table' ),
            'Table'[ValidFromDate] &amp;lt; _MaxDate &amp;amp;&amp;amp;
            'Table'[ValidToDate]   &amp;gt; _MaxDate
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:52:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-too-Slow-with-Filtering/m-p/3533617#M135782</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-11-14T17:52:47Z</dc:date>
    </item>
  </channel>
</rss>

