<?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: Compairing a date measure to a date column in the same dimension table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260068#M54617</link>
    <description>&lt;P&gt;Try this&amp;nbsp;&lt;A title="Click here to download PBIX" href="https://1drv.ms/u/s!AgMTUY3Uvq3bgup6xtqGcJe5n2FTYg?e=foRMEE" target="_self"&gt;Click here to download PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 19:38:03 GMT</pubDate>
    <dc:creator>speedramps</dc:creator>
    <dc:date>2021-12-29T19:38:03Z</dc:date>
    <item>
      <title>Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259858#M54606</link>
      <description>&lt;P&gt;I'm trying to create a filter to determine the inclusion or exclusion of records in a dimension table based on whether the Threshold Date for each record is less than the calculated Last Date measure. There's probably a much more intelligent way to do this, but I'm kind of stumbling my way around here and am not very good with DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The threshold date column is native to the imported Excel spreadsheet that I'm using as a dimension table; the measure is based on a calendar dimension table imported from a data warehouse, and I'm selecting date ranges using a date slicer in the report. I've tried calculating the Last Date two different ways:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1) Using CALCULATE and LASTDATE: CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Date (EDW)]&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;'Calendar'[Date (EDW)]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;2) Using MAXX:&amp;nbsp;&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;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Date (EDW)]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Both work fine as measures. If I try to convert them into dimensions (or create them as columns instead of measures), they'll ignore the slicer and just return the last date from my entire calendar table. Similarly, if I try to create an IF statement returning a one or zero based on whether the Threshold Date falls before the Last Date, the formula returns a value of one for all records in the dimension table with a Threshold Date that falls before the last date in my calendar table.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there a way to compare my Last Date and Threshold Date that will still apply the slicer to the Last Date?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I can't create an active relationship between the calendar dimension table and the dimension table containing Threshold Dates because the calendar dimension table already joins to two fact tables which then join to the dimension table containing Threshold Dates.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Dec 2021 15:52:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259858#M54606</guid>
      <dc:creator>arc_gts</dc:creator>
      <dc:date>2021-12-29T15:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259869#M54607</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I dont understand you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I suggest rather than you try explain you rsolution (which does not work and you want us to fix).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That you simply explain the problem more clearly and with an exmaple, then I am sure we can all help you with this date filter issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 15:58:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259869#M54607</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2021-12-29T15:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259877#M54609</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324188" data-lia-user-login="arc_gts" class="lia-mention lia-mention-user"&gt;arc_gts&lt;/a&gt;&amp;nbsp;provide sample data and expected output&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 16:08:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2259877#M54609</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-29T16:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260013#M54614</link>
      <description>&lt;P&gt;Goal: add an indicator that I can use as a filter to show or hide rows in a table based on a date in the table vs. a date in a slicer (no direct relationship between date slicer table and dimension table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected outcome: rows in the dimension table with a greater date than the maximum selected slicer date value should have a value of zero, while rows in the dimension table with a value less than / equal to the maximum selected slicer date value should have a value of 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actual outcome: rows in the dimension table that have date value that exists in the calendar table have a value of 1, ignoring the selected range in the slicer; rows in the dimension table that have a date value that doesn't exist in the calendar table (greater than the max date value) have a value of zero&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see below. It looks like I'm unable to upload a PBIX file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 18:21:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260013#M54614</guid>
      <dc:creator>arc_gts</dc:creator>
      <dc:date>2021-12-29T18:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260048#M54615</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cant upload PBIX to the forum.&lt;/P&gt;&lt;P&gt;You need to save it on Onedrop or Dropbox with public view access and then share the link on the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 19:15:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260048#M54615</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2021-12-29T19:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260068#M54617</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;A title="Click here to download PBIX" href="https://1drv.ms/u/s!AgMTUY3Uvq3bgup6xtqGcJe5n2FTYg?e=foRMEE" target="_self"&gt;Click here to download PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 19:38:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260068#M54617</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2021-12-29T19:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260304#M54641</link>
      <description>&lt;P&gt;PBIX file &lt;A href="https://www.dropbox.com/s/s1qlg4deqxljtn6/selected%20date%20comparison.pbix?dl=0" target="_self"&gt;link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 01:09:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260304#M54641</guid>
      <dc:creator>arc_gts</dc:creator>
      <dc:date>2021-12-30T01:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compairing a date measure to a date column in the same dimension table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260319#M54642</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324188" data-lia-user-login="arc_gts" class="lia-mention lia-mention-user"&gt;arc_gts&lt;/a&gt;&amp;nbsp; you can write this two measures&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;_isThresholdLesserThanLastSelected = if(MAX(Category[Threshold Date])&amp;lt;=[Category last date],0,1)

_isThresholdGTThanLastSelected = if(MAX(Category[Threshold Date])&amp;gt;[Category last date],0,1)&lt;/LI-CODE&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;</description>
      <pubDate>Thu, 30 Dec 2021 01:25:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compairing-a-date-measure-to-a-date-column-in-the-same-dimension/m-p/2260319#M54642</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-30T01:25:02Z</dc:date>
    </item>
  </channel>
</rss>

