<?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 Calculating Rolling Days - Blank Date field - not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Rolling-Days-Blank-Date-field-not-working/m-p/703466#M862</link>
    <description>&lt;P&gt;Hello BI Group,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to create a rolling day count of open &amp;amp; closed tickets, based on the fact that the&amp;nbsp;&lt;/P&gt;&lt;P&gt;the open tickets date column is BLANK and the closed date field is not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first measure to count the number of closed tickets is (and is calculating the correct number) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Count Closed Tickets = CALCULATE([Count HelpDesk Rows], FILTER(HelpDesk, HelpDesk[Resolution Date] &amp;lt;&amp;gt; 0))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This comes up with the correct number.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, when I attempt to create an additional measure to calculate the number of closed tickets&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for the last 90 days (Rolling), the results are scewed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here is the second measure.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ClosedTicketsRolling90 = CALCULATE([Count CLosed Tickets], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -90, DAY))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MAX(DateDim[Date]) is always current date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance.&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 04 Jun 2019 13:58:42 GMT</pubDate>
    <dc:creator>prbibuilder</dc:creator>
    <dc:date>2019-06-04T13:58:42Z</dc:date>
    <item>
      <title>Calculating Rolling Days - Blank Date field - not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Rolling-Days-Blank-Date-field-not-working/m-p/703466#M862</link>
      <description>&lt;P&gt;Hello BI Group,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to create a rolling day count of open &amp;amp; closed tickets, based on the fact that the&amp;nbsp;&lt;/P&gt;&lt;P&gt;the open tickets date column is BLANK and the closed date field is not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first measure to count the number of closed tickets is (and is calculating the correct number) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Count Closed Tickets = CALCULATE([Count HelpDesk Rows], FILTER(HelpDesk, HelpDesk[Resolution Date] &amp;lt;&amp;gt; 0))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This comes up with the correct number.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, when I attempt to create an additional measure to calculate the number of closed tickets&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for the last 90 days (Rolling), the results are scewed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here is the second measure.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ClosedTicketsRolling90 = CALCULATE([Count CLosed Tickets], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -90, DAY))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MAX(DateDim[Date]) is always current date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance.&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Rolling-Days-Blank-Date-field-not-working/m-p/703466#M862</guid>
      <dc:creator>prbibuilder</dc:creator>
      <dc:date>2019-06-04T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Rolling Days - Blank Date field - not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Rolling-Days-Blank-Date-field-not-working/m-p/706663#M925</link>
      <description>&lt;P&gt;This solution is actually for calculation a rolling day count of Open and Closed tickets in a help desk system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I had to create one measure to count the number of rows in the table helpdesk.&lt;/P&gt;&lt;P&gt;Two, I had to create a measure that counted the number of open tickets by their status' (status column)&lt;/P&gt;&lt;P&gt;( I had to dig in the data to see what ticket categories were for open, and then for closed tickets.&lt;/P&gt;&lt;P&gt;Open =&amp;nbsp; Resolution Date is NOT populated.&lt;/P&gt;&lt;P&gt;Closed = A populated resolution date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to create two DateDIM tables, one for open tickets, and the other for closed tickets.&lt;/P&gt;&lt;P&gt;You need a relationship between the DateDim table and the helpdesk table joined by the creation date.&lt;/P&gt;&lt;P&gt;You need a relationship from the second Date2Dim table and the helpdesk table's resolution date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the above measures, additional table, and the relationships, the below measures worked correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HelpDesk Open 7 Days = CALCULATE([HelpDesk-CountOpenTx], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -7, DAY))&lt;/P&gt;&lt;P&gt;HelpDesk Closed 7 Days = CALCULATE([HelpDesk-CountClosedTx], DATESINPERIOD(DateDim2[Date], MAX(DateDim2[Date]), -7, DAY))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps someone out in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PR&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:59:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Rolling-Days-Blank-Date-field-not-working/m-p/706663#M925</guid>
      <dc:creator>prbibuilder</dc:creator>
      <dc:date>2019-06-04T13:59:29Z</dc:date>
    </item>
  </channel>
</rss>

