<?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: aggregate chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/aggregate-chart/m-p/4366067#M173359</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="913209" data-lia-user-login="hodobee" class="lia-mention lia-mention-user"&gt;hodobee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the testing, creating the date table to filter the chart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dates = CALENDAR(MIN('A'[date]), MAX('A'[date]))&lt;/LI-CODE&gt;
&lt;P&gt;Then, try using the following DAX formula to calculate the aggregate based on the selected month.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;calc_chart = 
   VAR max_month = MAX('Dates'[Date])
   RETURN
   CALCULATE(
       DISTINCTCOUNT('A'[Number]),
       FILTER(
           ALL('A'),
           'A'[Result] = "closed" &amp;amp;&amp;amp;
           'A'[Date] &amp;lt;= max_month &amp;amp;&amp;amp;
           (ISBLANK(SELECTEDVALUE('A'[where])) || 'A'[where] = SELECTEDVALUE('A'[where])) &amp;amp;&amp;amp;
           (ISBLANK(SELECTEDVALUE('A'[Year])) || 'A'[Year] = SELECTEDVALUE('A'[Year]))
       )
   )
&lt;/LI-CODE&gt;
&lt;P&gt;Drag the date table month column to the slicer visual.&lt;/P&gt;
&lt;P&gt;Select the month. The result is shown below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2025 02:15:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-01-16T02:15:03Z</dc:date>
    <item>
      <title>aggregate chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/aggregate-chart/m-p/4365383#M173321</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I have a problem I can't solve. I have a January aggregate chart and a February aggregate chart. If January and February are selected together in the filter it works fine. However, if I select only February, then the slices where there was no value for January are dropped. I have turned off the interaction between the filter and the chart and put a measure on the max date, but that way it counts with the max date, not February.&lt;BR /&gt;Or it doesn't work with that either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calc_chart =&lt;BR /&gt;VAR max_month = Max('A'[date])&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT('A'[number]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('A'),&lt;BR /&gt;'A'[result] = "closed" &amp;amp;&amp;amp;&lt;BR /&gt;'A'[date] &amp;lt;= max_month &amp;amp;&amp;amp;&lt;BR /&gt;(ISBLANK(SELECTEDVALUE('A'[where])) || 'A'[where] = SELECTEDVALUE('A'[where]) &amp;amp;&amp;amp;&lt;BR /&gt;(ISBLANK(SELECTEDVALUE('A'[year&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;])) || 'A'[year] = SELECTEDVALUE('A'[year]))&lt;BR /&gt;&lt;BR /&gt;)))&lt;BR /&gt;January:&lt;img /&gt;&lt;/P&gt;&lt;P&gt;January+February&lt;img /&gt;&lt;BR /&gt;Just February, dropped 2 slice &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;img /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 15:15:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/aggregate-chart/m-p/4365383#M173321</guid>
      <dc:creator>hodobee</dc:creator>
      <dc:date>2025-01-15T15:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: aggregate chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/aggregate-chart/m-p/4366067#M173359</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="913209" data-lia-user-login="hodobee" class="lia-mention lia-mention-user"&gt;hodobee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the testing, creating the date table to filter the chart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dates = CALENDAR(MIN('A'[date]), MAX('A'[date]))&lt;/LI-CODE&gt;
&lt;P&gt;Then, try using the following DAX formula to calculate the aggregate based on the selected month.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;calc_chart = 
   VAR max_month = MAX('Dates'[Date])
   RETURN
   CALCULATE(
       DISTINCTCOUNT('A'[Number]),
       FILTER(
           ALL('A'),
           'A'[Result] = "closed" &amp;amp;&amp;amp;
           'A'[Date] &amp;lt;= max_month &amp;amp;&amp;amp;
           (ISBLANK(SELECTEDVALUE('A'[where])) || 'A'[where] = SELECTEDVALUE('A'[where])) &amp;amp;&amp;amp;
           (ISBLANK(SELECTEDVALUE('A'[Year])) || 'A'[Year] = SELECTEDVALUE('A'[Year]))
       )
   )
&lt;/LI-CODE&gt;
&lt;P&gt;Drag the date table month column to the slicer visual.&lt;/P&gt;
&lt;P&gt;Select the month. The result is shown below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 02:15:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/aggregate-chart/m-p/4366067#M173359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-16T02:15:03Z</dc:date>
    </item>
  </channel>
</rss>

