<?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 Formula to count the number of days since the last accident excluding certain data. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-to-count-the-number-of-days-since-the-last-accident/m-p/2761676#M85626</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently using this formula:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Days Since Last Accident =&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_last&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;maxx&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;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Type of report]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Accident"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Date and time]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_last&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt;)+&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;to count the number of days since the last accident.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to add another variable to this formula that excludes "Property Damage" accidents. This data would be found i&lt;FONT size="3"&gt;n&amp;nbsp;'All_Data'[Type of Injury].&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;Is there any way to add this to my formula to exclude this data?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 12 Sep 2022 11:12:32 GMT</pubDate>
    <dc:creator>98Hodge</dc:creator>
    <dc:date>2022-09-12T11:12:32Z</dc:date>
    <item>
      <title>Formula to count the number of days since the last accident excluding certain data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-to-count-the-number-of-days-since-the-last-accident/m-p/2761676#M85626</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently using this formula:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Days Since Last Accident =&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_last&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;maxx&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;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Type of report]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Accident"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'All_Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Date and time]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_last&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt;)+&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;to count the number of days since the last accident.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to add another variable to this formula that excludes "Property Damage" accidents. This data would be found i&lt;FONT size="3"&gt;n&amp;nbsp;'All_Data'[Type of Injury].&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;Is there any way to add this to my formula to exclude this data?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Sep 2022 11:12:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-to-count-the-number-of-days-since-the-last-accident/m-p/2761676#M85626</guid>
      <dc:creator>98Hodge</dc:creator>
      <dc:date>2022-09-12T11:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Formula to count the number of days since the last accident excluding certain data.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-to-count-the-number-of-days-since-the-last-accident/m-p/2761784#M85631</link>
      <description>&lt;LI-CODE lang="markup"&gt;VAR _last=maxx(FILTER('All_Data','All_Data'[Type of report]="Accident" &amp;amp;&amp;amp; 'All_Data'[Type of Injury] &amp;lt;&amp;gt; "Property Damage"),'All_Data'[Date and time])
return (TODAY() - _last) * 1. + 0&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Sep 2022 11:53:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-to-count-the-number-of-days-since-the-last-accident/m-p/2761784#M85631</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-12T11:53:28Z</dc:date>
    </item>
  </channel>
</rss>

