<?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: Find the previous action in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3209191#M116992</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you know your dataset best. please feel free to change name to id.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 12:00:48 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-04-27T12:00:48Z</dc:date>
    <item>
      <title>Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3208520#M116944</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In power bi, I would like a column calculated in dax which puts a 1 on the last action which precedes the auto-close action of the same ID.&lt;BR /&gt;The table is called Journal, the time column is time, the column where we find the auto-close is called action.&lt;BR /&gt;I put an example of what I want.&lt;BR /&gt;Can you help me ?&lt;BR /&gt;THANKS&lt;/P&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;</description>
      <pubDate>Thu, 27 Apr 2023 06:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3208520#M116944</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-04-27T06:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3208570#M116947</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to add a calculated column like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
VAR _LastTime=
    MAXX(
        FILTER(
            data,
            data[name]=EARLIER(data[name])
                &amp;amp;&amp;amp;data[action]&amp;lt;&amp;gt;"auto-close"
        ),
        data[time]
    )
RETURN
    IF(
        [Time]=_LastTime,
        1
    )&lt;/LI-CODE&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 06:33:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3208570#M116947</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-27T06:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3209164#M116989</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;DIV&gt;Thank you very much, I will test.&lt;/DIV&gt;&lt;DIV&gt;Why does the formula include the name? Knowing that a person can have several IDs at the same time.&lt;/DIV&gt;&lt;DIV&gt;I think that it is rather necessary to insert the notion of ID.&lt;/DIV&gt;&lt;DIV&gt;Mat&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:39:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3209164#M116989</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-04-27T11:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3209191#M116992</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you know your dataset best. please feel free to change name to id.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:00:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3209191#M116992</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-27T12:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210073#M117053</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The results are not good.&lt;BR /&gt;I am currently having a problem accessing the table.&lt;BR /&gt;When I have new access, I will see what is causing the problem.&lt;BR /&gt;Small question, should the table be sorted?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 19:55:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210073#M117053</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-04-27T19:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210181#M117056</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what error do you get?&lt;/P&gt;&lt;P&gt;Sort will not change anything in most DAX occassions.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 22:21:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210181#M117056</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-27T22:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210710#M117085</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'll screenshot the problem for you.&lt;BR /&gt;I will privately send you the model with the data.&lt;BR /&gt;Is it related to the sorting of updated-at?&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;</description>
      <pubDate>Fri, 28 Apr 2023 07:25:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3210710#M117085</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-04-28T07:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3213534#M117264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Please try,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Auto-close = 
VAR _close_time = CALCULATE(MAX('Table'[Time]),'Table'[action]="auto-close",ALLEXCEPT('Table','Table'[ID]))
VAR _result =IF('Table'[Time]=CALCULATE(MAX('Table'[Time]),'Table'[Time]&amp;lt;_close_time),1)
RETURN
_result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 10:12:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3213534#M117264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-01T10:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3213632#M117268</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;BR /&gt;Is it possible to have a 1 just on the action which precedes and not all the actions which precede.&lt;BR /&gt;THANKS&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 11:58:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3213632#M117268</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-05-01T11:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3256371#M120269</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you help me ?&lt;BR /&gt;Mathieu&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 15:42:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3256371#M120269</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-05-27T15:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3257455#M120338</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please consider providing a sample file that can cover the question and give the expected output. Note that it should not contain private data.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;How to provide sample data in the Power BI Forum - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 06:24:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3257455#M120338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-29T06:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3259004#M120452</link>
      <description>&lt;P&gt;Hello, here is an example of data :&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1L4y2fVMP6UoilrKO5vpiCTTV5z-80D3i/view?usp=share_link" target="_blank"&gt;https://drive.google.com/file/d/1L4y2fVMP6UoilrKO5vpiCTTV5z-80D3i/view?usp=share_link&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 07:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3259004#M120452</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-05-30T07:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3260670#M120548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The link requires permission to access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gao&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 01:44:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3260670#M120548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-31T01:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3286362#M122196</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;This should be good.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:41:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3286362#M122196</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-06-15T15:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3287015#M122233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275205" data-lia-user-login="MathieuF" class="lia-mention lia-mention-user"&gt;MathieuF&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that the key [action] field is missing from the data.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR _close_time = CALCULATE(MAX('Table'[created_at]),'Table'[action]="auto-close",ALLEXCEPT('Table','Table'[ID]))
VAR _result =IF('Table'[created_at]=CALCULATE(MAX('Table'[created_at]),'Table'[created_at]&amp;lt;_close_time,ALLEXCEPT('Table','Table'[ID])),1)
RETURN
_result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008080"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 02:17:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3287015#M122233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-16T02:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3287909#M122300</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help, unfortunately, I have an error message:&lt;BR /&gt;It is not possible to determine a unique value for the "created_at" column of the "Journal" table. This can happen when a measure formula refers to a column that contains many values, without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;&lt;P&gt;So I changed the query to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Auto-close = 
VAR _close_time = CALCULATE(MAX('Journal'[created_at]),'Journal'[action]="auto-close",ALLEXCEPT('Journal','Journal'[id]))
VAR _result =IF(MAX('journal'[created_at])=CALCULATE(MAX('Journal'[created_at]),'Journal'[created_at]&amp;lt;_close_time,ALLEXCEPT('Journal','Journal'[id])),1)
RETURN
_result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it good ?&lt;BR /&gt;Because I have no result &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 12:59:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3287909#M122300</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-06-16T12:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3517547#M135077</link>
      <description>&lt;P&gt;Good morning,&lt;BR /&gt;Let me come back to you because I'm still stuck.&lt;BR /&gt;I am looking to put the name of the agent in the column created in front of the line Journal[action]=auto-close which follows the line where I have the agent for the same task_id.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1j-P7F-Prw_5y-3QmV8WzE8GdApm1X5NX/view?usp=drive_link" target="_blank"&gt;https://drive.google.com/file/d/1j-P7F-Prw_5y-3QmV8WzE8GdApm1X5NX/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:10:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3517547#M135077</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-11-06T11:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find the previous action</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3533020#M135757</link>
      <description>&lt;P&gt;Good morning,&lt;BR /&gt;With the formula below, how to display only one 1; the one just after the auto-close?&lt;BR /&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;`&lt;SPAN&gt;Auto-close2 =&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_close_time&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[created_at]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[action]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"auto-close"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[task_id]&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;_result&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[created_at]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[created_at]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[created_at]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;_close_time&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'journal'&lt;/SPAN&gt;&lt;SPAN&gt;[task_id]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_result&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 15:23:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-the-previous-action/m-p/3533020#M135757</guid>
      <dc:creator>MathieuF</dc:creator>
      <dc:date>2023-11-14T15:23:24Z</dc:date>
    </item>
  </channel>
</rss>

