<?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: Filter a page with date less than max date from Fact table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695928#M143729</link>
    <description>&lt;P&gt;I am preparing an example.&lt;BR /&gt;&lt;BR /&gt;In parallel I will add a flag in my date table to tag all dates where there is data in FactB. I will filter on that tag afterward.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 09:14:23 GMT</pubDate>
    <dc:creator>bol</dc:creator>
    <dc:date>2024-02-13T09:14:23Z</dc:date>
    <item>
      <title>Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3694466#M143647</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to DAX, just received a two days training overall on PBI after a few months struggling for basically anything related to DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Data model contains several fact tables. One table with 'FactA'[Date] data in 2024, another with 'FactB'[Date] only up to 2023.&lt;/P&gt;&lt;P&gt;I want to create a page specific to the 'FactB' (max 2023).&lt;/P&gt;&lt;P&gt;I also want to calculate anything using my Date table to keep it at the center of any calculation involving dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I create a segment with 'Date'[Date], I will have 2024 has the max date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance I have several measures :&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MaxYear =&lt;/SPAN&gt; &lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;allselected&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MaxYear-1&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;[MaxYear]&lt;/SPAN&gt;&lt;SPAN&gt;-1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MaxYear-&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;[MaxYear]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If I put MaxYear in a card, by default it display 2024. I wish in my case that it displays 2023.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;Obviously I want&amp;nbsp;&lt;SPAN&gt;MaxYear-1 &amp;amp;&amp;nbsp;MaxYear-2 to follow.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I tried a trick with a filter like TableB[id] is not null without success.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I will clarify if necessary.&lt;BR /&gt;&lt;BR /&gt;I looked in several other posts but somehow didn't find something related. Happy to know if you are more lucky.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Feb 2024 16:09:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3694466#M143647</guid>
      <dc:creator>bol</dc:creator>
      <dc:date>2024-02-12T16:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695031#M143683</link>
      <description>&lt;P&gt;What's preventing you from using the filter pane "Filters on this page"&amp;nbsp; ?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 00:54:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695031#M143683</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-13T00:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695694#M143719</link>
      <description>&lt;P&gt;Nothing is preventing me from using it except the way to use it or my skill.&lt;BR /&gt;&lt;BR /&gt;Which measure should I put there? 'MaxYear' ?&lt;BR /&gt;Which criteria should I set on that measure? 'less than' what ?&lt;BR /&gt;&lt;BR /&gt;I am looking for a dynamic solution. I don't want to set a constant otherwise I will have to change it (or the user) as soon as there will be data in 2024.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 07:48:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695694#M143719</guid>
      <dc:creator>bol</dc:creator>
      <dc:date>2024-02-13T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695928#M143729</link>
      <description>&lt;P&gt;I am preparing an example.&lt;BR /&gt;&lt;BR /&gt;In parallel I will add a flag in my date table to tag all dates where there is data in FactB. I will filter on that tag afterward.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 09:14:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695928#M143729</guid>
      <dc:creator>bol</dc:creator>
      <dc:date>2024-02-13T09:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695994#M143731</link>
      <description>&lt;P&gt;Here is the example.&lt;/P&gt;&lt;P&gt;In page ViewAll, no filter. In page View B, I filtered manually with date less than 2024. I wish to to make that filter automatic to max FactB[Date].&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/2v6ii2z4yaluz71vnmim2/MaxDateTableB.pbix?rlkey=a43x1188aerf6g9nbonvzbwvc&amp;amp;dl=0" target="_blank" rel="noopener"&gt;MaxDateTableB.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 09:35:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3695994#M143731</guid>
      <dc:creator>bol</dc:creator>
      <dc:date>2024-02-13T09:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3697385#M143782</link>
      <description>&lt;P&gt;see attached.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE1 :&amp;nbsp; This is a measure filter on a visual. If your data sources are in import mode you could add a calculated column to the calendar table instead and make it a page or report filter.&lt;/P&gt;
&lt;P&gt;NOTE2 :&amp;nbsp; You are comparing filter context to scalar value.&amp;nbsp; I chose the MIN aggregation to include the entire filter context. You could use MAX instead to cut off exactly at the date.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 22:25:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3697385#M143782</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-13T22:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a page with date less than max date from Fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3703461#M144052</link>
      <description>&lt;P&gt;Thank you for the measure. It helped to save some time instead of figuring it out by myself.&lt;BR /&gt;I added it to my calendar table, and after fixing my dates columns it worked nicely as a filter.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 08:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-page-with-date-less-than-max-date-from-Fact-table/m-p/3703461#M144052</guid>
      <dc:creator>bol</dc:creator>
      <dc:date>2024-02-16T08:44:38Z</dc:date>
    </item>
  </channel>
</rss>

