<?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: Keeping track of the last status in tickets in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361405#M126370</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="565196" data-lia-user-login="rubayatyasmin" class="lia-mention lia-mention-user"&gt;rubayatyasmin&lt;/a&gt;&amp;nbsp;Thanks for the input, that might actually work, but somehow in only get blanks in return. I tried both LASTNONBLANK() and LASTNONBLANKVALUE(). Might be that something is wrong with the filtering?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my last attempt:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Status = IF(
    [Created IDMonth]&amp;lt;[IDMonth],    
    CALCULATE(
      LASTNONBLANK(StatusChanges[Last Status in Month],StatusChanges[Last Status in Month]),
         FILTER(
            StatusChanges, 
            StatusChanges[ISSUE_KEY] = EARLIER(IssueStatusHistory[ISSUE_KEY])&amp;amp;&amp;amp;
            StatusChanges[CREATED]=MAX(StatusChanges[CREATED]))),
      "Not created yet")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to put some context I need to have the value in StatusChanges[Last Status in Month] put into the IssueStatusHistory[Status] column.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 09:14:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-02T09:14:37Z</dc:date>
    <item>
      <title>Keeping track of the last status in tickets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3359709#M126296</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a fairly simple data model, a table "Issues", the "StatusChanges" which tracks all changes in status with a timestamp for each ticket, and finally a calculated table "IssueStatusHistory". The last table is meant to track the latest status for each ticket and month. That should let me go back in time to see how many tickets have had state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The column Status in IssueStatusHistory is what I want to use for that. It is important to note that the issues can switch status more than once during a month, so that is why the "statusChanges" table also contains the column "last status in month".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem now comes from the fact that an issue might be set to done in one month, but is then set to "To Do" again in a subsequent month. Also, some issues do not have any changes for more than one month (From Jan to April in the example below), and I want to make sure I populate those values for as long as the issue is in that status. As illustrated in the screenshots, the issue filtered in the table was changed to "Done" in May 2022, but then set to "To Do" in June. How can I change my Status Formula below to make sure I will always get the most recent change as per the StatusChanges table?&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;IssueStatusHistory:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;StatusChanges:&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 13:31:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3359709#M126296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T13:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping track of the last status in tickets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361057#M126352</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how about using LSTNONBLANK dax func to return the latest status change value?&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;&lt;P&gt;just to give you an idea: Might need to adjust the column names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Latest Status =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;LASTNONBLANK(StatusChanges[Status], StatusChanges[CREATED]),&lt;BR /&gt;FILTER(&lt;BR /&gt;StatusChanges,&lt;BR /&gt;StatusChanges[Issue_KEY] = EARLIER(Issues[Issue_KEY]) &amp;amp;&amp;amp;&lt;BR /&gt;StatusChanges[CREATED] = MAX(StatusChanges[CREATED])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;refer:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax" target="_blank"&gt;https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 06:10:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361057#M126352</guid>
      <dc:creator>rubayatyasmin</dc:creator>
      <dc:date>2023-08-02T06:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping track of the last status in tickets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361405#M126370</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="565196" data-lia-user-login="rubayatyasmin" class="lia-mention lia-mention-user"&gt;rubayatyasmin&lt;/a&gt;&amp;nbsp;Thanks for the input, that might actually work, but somehow in only get blanks in return. I tried both LASTNONBLANK() and LASTNONBLANKVALUE(). Might be that something is wrong with the filtering?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my last attempt:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Status = IF(
    [Created IDMonth]&amp;lt;[IDMonth],    
    CALCULATE(
      LASTNONBLANK(StatusChanges[Last Status in Month],StatusChanges[Last Status in Month]),
         FILTER(
            StatusChanges, 
            StatusChanges[ISSUE_KEY] = EARLIER(IssueStatusHistory[ISSUE_KEY])&amp;amp;&amp;amp;
            StatusChanges[CREATED]=MAX(StatusChanges[CREATED]))),
      "Not created yet")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to put some context I need to have the value in StatusChanges[Last Status in Month] put into the IssueStatusHistory[Status] column.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 09:14:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361405#M126370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T09:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping track of the last status in tickets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361492#M126374</link>
      <description>&lt;P&gt;Finally got it to work, here's the final DAX:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Status = IF(
    [Created IDMonth]&amp;lt;[IDMonth],    
    CALCULATE(
      LASTNONBLANKVALUE(StatusChanges[CREATED],MAX(StatusChanges[Last Status in Month])),
      FILTER(StatusChanges,
         StatusChanges[ISSUE_KEY]=IssueStatusHistory[ISSUE_KEY]&amp;amp;&amp;amp;
         StatusChanges[IDMonth_changes]&amp;lt;=IssueStatusHistory[IDMonth])),
      "Not created yet")&lt;/LI-CODE&gt;&lt;P&gt;The filtering based on IDMonth was still necessary, EARLIER() not really as each cell will run a table scan (as per my understanding). Finally, using LASTNONBLANKVALUE on Last Status in MOnth based on CREATED solved it. Thanks for the input&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="565196" data-lia-user-login="rubayatyasmin" class="lia-mention lia-mention-user"&gt;rubayatyasmin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 10:00:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361492#M126374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T10:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping track of the last status in tickets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361547#M126380</link>
      <description>&lt;P&gt;Good to know that the reply helped.&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;congratulations on solving your problem.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 10:49:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Keeping-track-of-the-last-status-in-tickets/m-p/3361547#M126380</guid>
      <dc:creator>rubayatyasmin</dc:creator>
      <dc:date>2023-08-02T10:49:42Z</dc:date>
    </item>
  </channel>
</rss>

