<?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: Set a Maximum and Minimum date filter on a Line Chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2841183#M90795</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;This sound like common multiple date fields analysis requirements, you can take a look at the following blog 'start date', 'end date' parts if it helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_self"&gt;Before You Post, Read This&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 03:11:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-14T03:11:27Z</dc:date>
    <item>
      <title>Set a Maximum and Minimum date filter on a Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2840090#M90734</link>
      <description>&lt;P&gt;Dear community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling on setting up a filter to show only date between a calculated Minimum date and a Maximum date.&lt;/P&gt;&lt;P&gt;This dynamic filter must be applied on the line chart, means for each &lt;STRONG&gt;Job_No &lt;/STRONG&gt;in the table has a different MIN Date and MAX Date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example for this particular job: this chart instead of being shown like this:&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;&lt;P&gt;it should be shown like this:&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;&lt;P&gt;The data comes from this table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:27:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2840090#M90734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-13T15:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set a Maximum and Minimum date filter on a Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2840952#M90783</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , not very clear. But you need measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new measure =&lt;BR /&gt;var _max = maxx(allselected(Date),Date[Date])&lt;BR /&gt;var _min = minx(allselected(Date),Date[Date]) &lt;BR /&gt;return &lt;BR /&gt;calculate( sum(Table[Value]), filter('Date',&amp;nbsp; 'Date'[Date] =_max)) - calculate( sum(Table[Value]), filter('Date',&amp;nbsp; 'Date'[Date] =_min))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 01:58:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2840952#M90783</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-14T01:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set a Maximum and Minimum date filter on a Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2841183#M90795</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;This sound like common multiple date fields analysis requirements, you can take a look at the following blog 'start date', 'end date' parts if it helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_self"&gt;Before You Post, Read This&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 03:11:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2841183#M90795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-14T03:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set a Maximum and Minimum date filter on a Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2842141#M90821</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Many thanks for the reply. I think I did not explain enough what I'm looking to achive.&lt;/P&gt;&lt;P&gt;The two lines shown in the line chart are from two different tables.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;1st table among other columns have accumulative hours consmption and dates of the consumptions.&lt;/LI&gt;&lt;LI&gt;2nd tables has the progress of the project and its date.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I was able to connect and put the two graph together. but I wanted to limit the time windows by a maximum date and a minimum date taken from the first table (hours consumption)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so instead of showing 0 progress 3 or 4 months before the consumptions starts. I want to see the two graph from the moment I have hours consumption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for that reason I've calculated the start date and end date of each project but I don't know how to apply this into the line chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of another project:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Not pleaseant view:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired automatic view:&lt;/STRONG&gt;&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;&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Abdel.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 10:16:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2842141#M90821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-14T10:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set a Maximum and Minimum date filter on a Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2844793#M91006</link>
      <description>&lt;P&gt;Found a solution,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created new column in the table Progress(Sheet2) called P_Date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;P_Date = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var DateMAx= MAXX(filter('ConsumptionTable','ConsumptionTable'[Job_NO]=earlier('Sheet1 (2)'[Job_No])),'ConsumptionTable'[MAX_Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var DateMin= MAXX(filter('ConsumptionTable','ConsumptionTable'[Job_NO]=earlier('Sheet1 (2)'[Job_No])),'ConsumptionTable'[MIN_Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var P_Date=&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF('Sheet1 (2)'[Posting_Date]&amp;lt;=DateMAx&amp;amp;&amp;amp;'Sheet1 (2)'[Posting_Date]&amp;gt;DateMin,'Sheet1 (2)'[Posting_Date],Blank())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return P_Date&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;With P_Date I limit the amount of values that neeed to be shown in the linechart taking into account the Max_Date and Min Date from the other table ConsumptionTable.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I hope this example can help others to filter the line chart based on Max date and Min Date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Best regards.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 16 Oct 2022 15:33:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Set-a-Maximum-and-Minimum-date-filter-on-a-Line-Chart/m-p/2844793#M91006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-16T15:33:22Z</dc:date>
    </item>
  </channel>
</rss>

