<?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: How to get the highest value on the same date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4273589#M169531</link>
    <description>&lt;P&gt;Hi Yulia,&lt;/P&gt;&lt;P&gt;Thanx for your solution. As i am on direct-query, i can't create that column.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 07:39:48 GMT</pubDate>
    <dc:creator>Roland74</dc:creator>
    <dc:date>2024-11-07T07:39:48Z</dc:date>
    <item>
      <title>How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260481#M168842</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;im struggling with this case. I've got this table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;(For the month June everything is the same, except the 'ResultID')&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a selected month i need the highest ResultID, i.e. for June i want the line with ID1841, but when i select August, June is also the highest ID. I've tried several formules, now i've got:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But i always get for june both lines:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Trying to understand what i'm doing wrong en why?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Oct 2024 12:18:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260481#M168842</guid>
      <dc:creator>Roland74</dc:creator>
      <dc:date>2024-10-28T12:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260496#M168843</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="831764" data-lia-user-login="Roland74" class="lia-mention lia-mention-user"&gt;Roland74&lt;/a&gt;&amp;nbsp;,&amp;nbsp;Create a measure to get the highest ResultID for the selected month:&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;MaxResultID = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX(Table[ResultID]),&lt;BR /&gt;ALLEXCEPT(Table, Table[Month])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure to check if the ResultID is the highest for the selected month:&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;IsMaxResultID = &lt;BR /&gt;IF(&lt;BR /&gt;Table[ResultID] = [MaxResultID],&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the IsMaxResultID measure to the visual level filters.&lt;BR /&gt;Set the filter to show only rows where IsMaxResultID is 1.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 12:29:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260496#M168843</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-10-28T12:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260499#M168844</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="831764" data-lia-user-login="Roland74" class="lia-mention lia-mention-user"&gt;Roland74&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
  VAR __Date = MAX( 'factProjectPreclosureResult'[PostingDateID] )
  VAR __Table = FILTER( ALL( 'factProjectPreclosureResult' ), [PostingDateID] = __Date )
  VAR __Result = MAXX( __Table, [ProjectPreclosureResultID] )
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Oct 2024 12:30:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260499#M168844</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-10-28T12:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260633#M168853</link>
      <description>&lt;P&gt;Hi Bhanu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanx for your reaction, but that doesn't seem to do the trick.&lt;/P&gt;&lt;P&gt;Still get the same result&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;</description>
      <pubDate>Mon, 28 Oct 2024 14:01:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260633#M168853</guid>
      <dc:creator>Roland74</dc:creator>
      <dc:date>2024-10-28T14:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260638#M168854</link>
      <description>&lt;P&gt;Hi Greg,&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least i get one result with your solution, but not the right one.&lt;/P&gt;&lt;P&gt;In my example i show only one jobID, but my real data contains over 2.000 unique ID's.&lt;/P&gt;&lt;P&gt;Now it shows the highest resultID in my table, but that does not belong to the selected JobID.&lt;/P&gt;&lt;P&gt;(I expect 1841)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 14:03:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4260638#M168854</guid>
      <dc:creator>Roland74</dc:creator>
      <dc:date>2024-10-28T14:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4261000#M168873</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="831764" data-lia-user-login="Roland74" class="lia-mention lia-mention-user"&gt;Roland74&lt;/a&gt;&amp;nbsp;I didn't know about JobID. Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
  VAR __Date = MAX( 'factProjectPreclosureResult'[PostingDateID] )
  VAR __JobID = MAX( 'factProjectPreclosureResult'[JobID] )
  VAR __Table = FILTER( ALL( 'factProjectPreclosureResult' ), [PostingDateID] = __Date &amp;amp;&amp;amp; [JobID] = __JobID )
  VAR __Result = MAXX( __Table, [ProjectPreclosureResultID] )
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Oct 2024 18:35:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4261000#M168873</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-10-28T18:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4263649#M168989</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="831764" data-lia-user-login="Roland74" class="lia-mention lia-mention-user"&gt;Roland74&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from&amp;nbsp;bhanu_gautam&amp;nbsp;and&amp;nbsp;Greg_Deckler,&amp;nbsp;please allow me to provide another insight:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I added a row of data to the sample data you gave, as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1.&amp;nbsp;Create a calculated column as a slicer table or filter&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Slicer = VALUES('Table'[PostingDateID])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no relationship between the two tables.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Create a measure as follows&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _selected = SELECTEDVALUE('Slicer'[PostingDateID])
VAR _max = CALCULATE(MAX([ProjectPreclosureResultID]), FILTER(ALL('Table'), [PostingDateID] = _selected))
RETURN
IF(_selected = BLANK(), 1, IF(MAX([ProjectPreclosureResultID]) = _max, 1, 0))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Put the measure into the visual-level filters, set up show items when the value is 1.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use slicer&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or use filter&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yulia Xu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&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.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 09:46:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4263649#M168989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-30T09:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4273589#M169531</link>
      <description>&lt;P&gt;Hi Yulia,&lt;/P&gt;&lt;P&gt;Thanx for your solution. As i am on direct-query, i can't create that column.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 07:39:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4273589#M169531</guid>
      <dc:creator>Roland74</dc:creator>
      <dc:date>2024-11-07T07:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the highest value on the same date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4273591#M169532</link>
      <description>&lt;P&gt;After some trial-and-error i found the solution, which was quite simple.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MaxID_Calc2 =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;factProjectPreclosureResult&lt;/SPAN&gt;&lt;SPAN&gt;[ProjectPreclosureResultID]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;factProjectPreclosureResult&lt;/SPAN&gt;&lt;SPAN&gt;[ProjectPreclosureResultID]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;factProjectPreclosureResult&lt;/SPAN&gt;&lt;SPAN&gt;[PostingDateID]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Nov 2024 07:41:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-highest-value-on-the-same-date/m-p/4273591#M169532</guid>
      <dc:creator>Roland74</dc:creator>
      <dc:date>2024-11-07T07:41:28Z</dc:date>
    </item>
  </channel>
</rss>

