<?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: Dynamic Table Filtering with Larger Data Model in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Table-Filtering-with-Larger-Data-Model/m-p/1957010#M30511</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can make a filter measure for your column.&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 149px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/553040i0E089FCAAACE7FAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Build an unrelated Date Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date = CALENDAR(DATE(2021,07,01),DATE(2021,07,14))&lt;/LI-CODE&gt;
&lt;P&gt;Filter Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Filter Measure = 
VAR _MaxDate = SELECTEDVALUE('Date'[Date])
VAR _MinDate = SELECTEDVALUE('Date'[Date]) - 7
VAR _Filter = IF(MAX(Tab[Date])&amp;gt; _MinDate&amp;amp;&amp;amp;MAX(Tab[Date])&amp;lt;=_MaxDate,1,0)
return
_Filter&lt;/LI-CODE&gt;
&lt;P&gt;Add this measure into page level filter field in your Matrix.&lt;/P&gt;
&lt;P&gt;If i select 2021/07/14 in slicer, I should get results between 2021/07/08 and 2021/07/14.&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/553050i8F1CC5A8BA0FFEB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 09:50:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-14T09:50:35Z</dc:date>
    <item>
      <title>Dynamic Table Filtering with Larger Data Model</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Table-Filtering-with-Larger-Data-Model/m-p/1950523#M30448</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to create a report with a Matrix visual, showing all detail columns coming from dimensions and the measure needs to be filtered to last 7 days from the selected slicer date based on grouping on a column from dimension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SQL query needs to be achieved in Power BI:&lt;/P&gt;&lt;P&gt;SELECT Col1, COUNT(*) from Tab where Date &amp;gt; MIN(Slicer Date) and Date &amp;lt;= MAX(Slicer Date) group by Col1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Matrix Visual contains:&lt;/P&gt;&lt;P&gt;Dim1Col1, DIM2col2,Fact1Col1,Fact1Col2,Dim3Col1,Measure1,Measure2,Measure3,Measure4,Measure5&lt;/P&gt;&lt;P&gt;Measure1 : DAX converted from above SQL Query&lt;/P&gt;&lt;P&gt;Measure2: If (SQL Query Result) &amp;gt; 1, 1,0&lt;/P&gt;&lt;P&gt;Measure3: Measure1/Measure2&lt;/P&gt;&lt;P&gt;Measure4: If(SQL Query Result) =1,1,0)&lt;/P&gt;&lt;P&gt;Measure5: Measure4/Measure1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Dax query with Measure as filter and using same logic to calculate the measure with ALLEXCEPT was working with flat table structure but once I converted to Modelling its not working, the visual never load. My Dim tables are large with 1M records and fact table has only 5K records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The old logic doesnt work with even just 1000 records in everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be a great if any one could help me with this, struggling since a while now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a ton in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already tried the approach of&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 20:05:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Table-Filtering-with-Larger-Data-Model/m-p/1950523#M30448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-11T20:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table Filtering with Larger Data Model</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Table-Filtering-with-Larger-Data-Model/m-p/1957010#M30511</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can make a filter measure for your column.&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 149px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/553040i0E089FCAAACE7FAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Build an unrelated Date Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date = CALENDAR(DATE(2021,07,01),DATE(2021,07,14))&lt;/LI-CODE&gt;
&lt;P&gt;Filter Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Filter Measure = 
VAR _MaxDate = SELECTEDVALUE('Date'[Date])
VAR _MinDate = SELECTEDVALUE('Date'[Date]) - 7
VAR _Filter = IF(MAX(Tab[Date])&amp;gt; _MinDate&amp;amp;&amp;amp;MAX(Tab[Date])&amp;lt;=_MaxDate,1,0)
return
_Filter&lt;/LI-CODE&gt;
&lt;P&gt;Add this measure into page level filter field in your Matrix.&lt;/P&gt;
&lt;P&gt;If i select 2021/07/14 in slicer, I should get results between 2021/07/08 and 2021/07/14.&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/553050i8F1CC5A8BA0FFEB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 09:50:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Table-Filtering-with-Larger-Data-Model/m-p/1957010#M30511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-14T09:50:35Z</dc:date>
    </item>
  </channel>
</rss>

