<?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: Calculating the number of days since last incident using DATEDIFF? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778134#M86818</link>
    <description>&lt;P&gt;Thank you for this! While this gives me the number of days since the last incident overall, I am still having trouble figuring out how to narrow it down to only the criteria I need (first aids, recordables, and lost times) and not just every incident that gets inputted on our log. I also only need it for the two departments: maintenance and construction.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2022 15:42:59 GMT</pubDate>
    <dc:creator>ld17</dc:creator>
    <dc:date>2022-09-19T15:42:59Z</dc:date>
    <item>
      <title>Calculating the number of days since last incident using DATEDIFF?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778007#M86804</link>
      <description>&lt;P&gt;I have some incident data, and I need to count the number of days since any of the following have occurred: first aid, recordable, and lost time. I would like to use a card to display the total number of days since any of these have occurred. There are some incidents in the column, such as near misses, that I do not want to count. Basically I would like the first aids, recordables, and lost times to be aggregated so that if any of them occur, the total safe days reset to zero. My understanding is that I can use a DAX expression using DATEDIFF, but I can only figure out how to count the days between one value, not all three.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ultimately, I want to have one count for maintenance "safe days" and another count for construction "safe days." I have some sample data shown below to demonstrate the columns I have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 14:58:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778007#M86804</guid>
      <dc:creator>ld17</dc:creator>
      <dc:date>2022-09-19T14:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of days since last incident using DATEDIFF?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778032#M86811</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405324" data-lia-user-login="ld17" class="lia-mention lia-mention-user"&gt;ld17&lt;/a&gt;&amp;nbsp;Maybe:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __Today = TODAY()
  VAR __Last = MAX('Table'[Date of Incident])
RETURN
  ( __Today - __Last ) * 1.&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Sep 2022 14:58:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778032#M86811</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-19T14:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of days since last incident using DATEDIFF?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778134#M86818</link>
      <description>&lt;P&gt;Thank you for this! While this gives me the number of days since the last incident overall, I am still having trouble figuring out how to narrow it down to only the criteria I need (first aids, recordables, and lost times) and not just every incident that gets inputted on our log. I also only need it for the two departments: maintenance and construction.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 15:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778134#M86818</guid>
      <dc:creator>ld17</dc:creator>
      <dc:date>2022-09-19T15:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of days since last incident using DATEDIFF?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778178#M86823</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405324" data-lia-user-login="ld17" class="lia-mention lia-mention-user"&gt;ld17&lt;/a&gt;&amp;nbsp;Well generally that would be done by putting your columns for that into some kind of visualization and thereby filtering the underlying table. But, you could also use MAXX(FILTER(...),...) when getting your __Last and thus hard code your filtering criteria if necessary.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 15:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778178#M86823</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-19T15:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of days since last incident using DATEDIFF?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778254#M86835</link>
      <description>&lt;P&gt;Ah, that makes sense. I was being dumb and overthinking that. That works. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 16:28:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-number-of-days-since-last-incident-using/m-p/2778254#M86835</guid>
      <dc:creator>ld17</dc:creator>
      <dc:date>2022-09-19T16:28:56Z</dc:date>
    </item>
  </channel>
</rss>

