<?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: Max funtion in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692233#M81106</link>
    <description>&lt;P&gt;Hi, You can filter out the row which has minium value then get the minimum value to find penultimate as below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 10:40:22 GMT</pubDate>
    <dc:creator>colacan</dc:creator>
    <dc:date>2022-08-10T10:40:22Z</dc:date>
    <item>
      <title>Max funtion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692151#M81101</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm a newbie who is interesting in Power Bi and the working of DAX.&lt;/P&gt;&lt;P&gt;Now I'm trying to get the penultimate record in a colum. Is there a function in DAX what can help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can anyone help me in achiving this measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jeffrey&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Aug 2022 10:13:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692151#M81101</guid>
      <dc:creator>Jeffrey_VC</dc:creator>
      <dc:date>2022-08-10T10:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max funtion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692223#M81105</link>
      <description>&lt;P&gt;If you have a unique column in the table, like an ID, then you could do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Penultimate value =
VAR maxID =
    MAX ( 'Table'[ID] )
VAR val =
    SELECTCOLUMNS (
        CALCULATETABLE ( TOPN ( 1, 'Table', 'Table'[ID] ), 'Table'[ID] &amp;lt; maxID ),
        "@val", 'Table'[Desired column]
    )
RETURN
    val&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Aug 2022 10:38:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692223#M81105</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-10T10:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Max funtion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692233#M81106</link>
      <description>&lt;P&gt;Hi, You can filter out the row which has minium value then get the minimum value to find penultimate as below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 10:40:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692233#M81106</guid>
      <dc:creator>colacan</dc:creator>
      <dc:date>2022-08-10T10:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max funtion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692286#M81107</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;BR /&gt;&lt;BR /&gt;I have tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Penultimate = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;minscore&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;minx&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Ledigingen uit Middleware'&lt;/SPAN&gt;&lt;SPAN&gt;[Datum/tijd]&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; &lt;/SPAN&gt;&lt;SPAN&gt;'Ledigingen uit Middleware'&lt;/SPAN&gt;&lt;SPAN&gt;[Datum/tijd]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;penul_wo_min&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Ledigingen uit Middleware'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Ledigingen uit Middleware'&lt;/SPAN&gt;&lt;SPAN&gt;[Datum/tijd]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;minscore&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;penul_wo_min&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Ledigingen uit Middleware'&lt;/SPAN&gt;&lt;SPAN&gt;[Datum/tijd]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;The result is not the Penultimate but the first in the dataset:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;img /&gt;&lt;P&gt;And I need:&lt;/P&gt;&lt;img /&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;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Aug 2022 10:57:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2692286#M81107</guid>
      <dc:creator>Jeffrey_VC</dc:creator>
      <dc:date>2022-08-10T10:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Max funtion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2693258#M81165</link>
      <description>&lt;P&gt;Hi Johnt75,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that looks like a solution. Thnx!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 17:43:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-funtion/m-p/2693258#M81165</guid>
      <dc:creator>Jeffrey_VC</dc:creator>
      <dc:date>2022-08-10T17:43:13Z</dc:date>
    </item>
  </channel>
</rss>

