<?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: Chart to show 3 months if data by selected date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3445094#M131044</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="620981" data-lia-user-login="Craig23" class="lia-mention lia-mention-user"&gt;Craig23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use selection slicer, I suggest you to create an unrelated calendar table to help your calculation.&lt;/P&gt;
&lt;P&gt;Data model:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling 3 Month = 
VAR _SELECTION = MAX('Calendar'[Date])
RETURN
IF(MAX('Table'[Date])&amp;lt;=_SELECTION,
CALCULATE (
    SUM('Table'[Value]),
    FILTER(ALL('Table'), 'Table'[Date] &amp;gt;=EOMONTH(MAX('Table'[Date]),-3)+1&amp;amp;&amp;amp; 'Table'[Date]&amp;lt;=MAX('Table'[Date]))
))&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 03:20:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-25T03:20:08Z</dc:date>
    <item>
      <title>Chart to show 3 months if data by selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3442413#M130808</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a line chart that shows the number of enquiries by 3 month periods based on a selected month. Ie, If May 2023 is selected the last data point will be the sum of enquires for March - May 2023, the previous data point would be for December - February etc. I have a measure to sum the 3 month periods but when I produce the chart it shows every month (so its showing data as a rolling 3 months). I only want to show the highlighted data points. I assume a need a dynamic date table for the x-axis that pulls in the selected month and then calculates the other months to show but I can't get this to work?&lt;/P&gt;&lt;P&gt;.&lt;img /&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this would be easy to do by financial quarters but the client wants to choose the 3 month period as ending on any month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 06:02:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3442413#M130808</guid>
      <dc:creator>Craig23</dc:creator>
      <dc:date>2023-09-22T06:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Chart to show 3 months if data by selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3442465#M130810</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="620981" data-lia-user-login="Craig23" class="lia-mention lia-mention-user"&gt;Craig23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why not create a Rolling 3 month measure?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last 3 months Amount = 
CALCULATE (
    [MyMeasure],
    DATESINPERIOD ( 'DIM Date'[Date], MAX ( 'DIM Date'[Date] ), -3, MONTH )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If this post helps, then please Accept it as the solution&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 06:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3442465#M130810</guid>
      <dc:creator>JoeBarry</dc:creator>
      <dc:date>2023-09-22T06:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Chart to show 3 months if data by selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3445094#M131044</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="620981" data-lia-user-login="Craig23" class="lia-mention lia-mention-user"&gt;Craig23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use selection slicer, I suggest you to create an unrelated calendar table to help your calculation.&lt;/P&gt;
&lt;P&gt;Data model:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling 3 Month = 
VAR _SELECTION = MAX('Calendar'[Date])
RETURN
IF(MAX('Table'[Date])&amp;lt;=_SELECTION,
CALCULATE (
    SUM('Table'[Value]),
    FILTER(ALL('Table'), 'Table'[Date] &amp;gt;=EOMONTH(MAX('Table'[Date]),-3)+1&amp;amp;&amp;amp; 'Table'[Date]&amp;lt;=MAX('Table'[Date]))
))&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 03:20:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Chart-to-show-3-months-if-data-by-selected-date/m-p/3445094#M131044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-25T03:20:08Z</dc:date>
    </item>
  </channel>
</rss>

