<?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: Count distinct cases between 2 measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1167315#M17938</link>
    <description>&lt;P&gt;your sample data is inconstent (especially the last close date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it matter how long a case was open? What if it is open for more than one month? More than 3 months?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 00:24:29 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2020-06-18T00:24:29Z</dc:date>
    <item>
      <title>Count distinct cases between 2 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1167024#M17928</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="post-text"&gt;&lt;P&gt;I am working on a measure to calculate when a support case is closed and when it is closed within a fiscal month. Below I have an example of when a case was opened before the fiscal month and closed within that month. A case that was opened and closed within the fiscal month and lastly when a case was opened in the fiscal month but closed after the end. My 'Total Fiscal Received' column is marking them as 1 but the total is wrong. This should be 3 rather than 2. I have the formula for this to be:&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Total Fiscal Resolved = if([Fiscal Resolved]= BLANK(),[Resolved],[Fiscal Resolved])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fiscal Resolved = CALCULATE(COUNTA(SF_Cases[Closed Date ONLY]),FILTER(SF_Cases,SF_Cases[Created Date ONLY]RELATED(FiscalCalendar_Lookup[Start of Fiscal Month])))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolved = CALCULATE(COUNTA(SF_Cases[Closed Date ONLY]),USERELATIONSHIP(FiscalCalendar_Lookup[Date],SF_Cases[Closed Date ONLY]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if anyone has an idea of how I can get this measure to calculate properly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Period-Year&lt;/TD&gt;&lt;TD&gt;Case Number&lt;/TD&gt;&lt;TD&gt;Created Date Only&lt;/TD&gt;&lt;TD&gt;Closed Date Only&lt;/TD&gt;&lt;TD&gt;Fiscal Resolved&lt;/TD&gt;&lt;TD&gt;Start Of Fiscal Month&lt;/TD&gt;&lt;TD&gt;End of Fiscal Month&lt;/TD&gt;&lt;TD&gt;Resolved&lt;/TD&gt;&lt;TD&gt;Count of Case Number&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;Total Fiscal Resolved&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-2019&lt;/TD&gt;&lt;TD&gt;686725&lt;/TD&gt;&lt;TD&gt;3/29/2019&lt;/TD&gt;&lt;TD&gt;4/1/2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;4/1/2019&lt;/TD&gt;&lt;TD&gt;4/28/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-2019&lt;/TD&gt;&lt;TD&gt;725507&lt;/TD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<pubDate>Thu, 18 Jun 2020 12:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1167024#M17928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-18T12:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct cases between 2 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1167315#M17938</link>
      <description>&lt;P&gt;your sample data is inconstent (especially the last close date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it matter how long a case was open? What if it is open for more than one month? More than 3 months?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 00:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1167315#M17938</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-18T00:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct cases between 2 measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1168803#M17976</link>
      <description>&lt;P&gt;I apologize. I was not able to post a photo of my table and had to manually create the results. I have updated the table to reflect the accurate information. As to your question, it does not matter how long a case is open. There are times a case can be open for 1 year then closed and that case should be counted in that specific fiscal period since it was closed. Which it currently is being counted in my resolved column since it was open before the specific fiscal period, in this case Apr-2019. This type of example is the first row. The case was opened before the fiscal period but closed during that period. My &lt;STRONG&gt;Resolved&lt;/STRONG&gt; measure is calculating that correctly but it does not seem to be getting counted in the &lt;STRONG&gt;Total Fiscal Resolved&lt;/STRONG&gt; of cases closed or open during that fiscal month.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 12:28:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-distinct-cases-between-2-measures/m-p/1168803#M17976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-18T12:28:40Z</dc:date>
    </item>
  </channel>
</rss>

