<?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 DAX Measure - Graph Active Cases Over Time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271481#M121274</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing a measure to calculate the total "active" help desk cases at any point in time.&lt;/P&gt;&lt;P&gt;Cases are "active" between their [EntryDate] and [CloseDate] inclusive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to graph this data over time in a line chart, and I want to adjust the time window using a date slicer.&lt;/P&gt;&lt;P&gt;I have a 'Date' table and a 'Cases' table, with [Date] 1:* [EntryDate].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cases with an [EntryDate] outside the date window should still be counted if they are active inside the date window. I've accomplished this by using ALL('Cases') in my DAX (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is, I also want to filter the measure by [Dept]. I don't see how I can do this while using&amp;nbsp;ALL('Cases'). How can I solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CaseVolume =
VAR vol =
    CALCULATE (
        COUNT ( 'Cases'[CaseID] ),
        FILTER (
            ALL ( 'Cases' ),
            'Cases'[EntryDate] &amp;lt;= MAX ( 'Date'[Date] )
                &amp;amp;&amp;amp; (
                    'Cases'[CloseDate] &amp;gt;= MAX ( 'Date'[Date] )
                        || ISBLANK ( 'Cases'[CloseDate] )
                )
        )
    )
RETURN
    IF ( ISBLANK ( vol ), 0, vol )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 00:44:42 GMT</pubDate>
    <dc:creator>cdfizz17</dc:creator>
    <dc:date>2023-06-07T00:44:42Z</dc:date>
    <item>
      <title>DAX Measure - Graph Active Cases Over Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271481#M121274</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing a measure to calculate the total "active" help desk cases at any point in time.&lt;/P&gt;&lt;P&gt;Cases are "active" between their [EntryDate] and [CloseDate] inclusive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to graph this data over time in a line chart, and I want to adjust the time window using a date slicer.&lt;/P&gt;&lt;P&gt;I have a 'Date' table and a 'Cases' table, with [Date] 1:* [EntryDate].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cases with an [EntryDate] outside the date window should still be counted if they are active inside the date window. I've accomplished this by using ALL('Cases') in my DAX (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is, I also want to filter the measure by [Dept]. I don't see how I can do this while using&amp;nbsp;ALL('Cases'). How can I solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CaseVolume =
VAR vol =
    CALCULATE (
        COUNT ( 'Cases'[CaseID] ),
        FILTER (
            ALL ( 'Cases' ),
            'Cases'[EntryDate] &amp;lt;= MAX ( 'Date'[Date] )
                &amp;amp;&amp;amp; (
                    'Cases'[CloseDate] &amp;gt;= MAX ( 'Date'[Date] )
                        || ISBLANK ( 'Cases'[CloseDate] )
                )
        )
    )
RETURN
    IF ( ISBLANK ( vol ), 0, vol )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 00:44:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271481#M121274</guid>
      <dc:creator>cdfizz17</dc:creator>
      <dc:date>2023-06-07T00:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure - Graph Active Cases Over Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271723#M121292</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;Please try using ALLSELECTED DAX function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/allselected-function-dax" target="_blank"&gt;ALLSELECTED function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 03:19:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271723#M121292</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-06-07T03:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure - Graph Active Cases Over Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271781#M121295</link>
      <description>&lt;P&gt;Thank you for the answer. Unfortunately, there is still an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On 17th May, there were 45 active cases. Using ALLSELECTED, only 19 are counted. There are 26 missing from the total. They are filtered out by the date slicer, because the [EntryDate] is before 17th May...&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;</description>
      <pubDate>Wed, 07 Jun 2023 04:12:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-Graph-Active-Cases-Over-Time/m-p/3271781#M121295</guid>
      <dc:creator>cdfizz17</dc:creator>
      <dc:date>2023-06-07T04:12:55Z</dc:date>
    </item>
  </channel>
</rss>

