<?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: Trouble Displaying Two Overlapping Line Graphs in Power BI using Dax functions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trouble-Displaying-Two-Overlapping-Line-Graphs-in-Power-BI-using/m-p/3219123#M117610</link>
    <description>&lt;P&gt;Hi ,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Accoridng to your description, you put two measures on the viusal and it only show one measure.&lt;/P&gt;
&lt;P&gt;And for the [&lt;SPAN&gt;AAAM_Prior_R12M&lt;/SPAN&gt;] measure , it seems to get the the sum of the first 24 months of the current year to the previous 12 months.&lt;/P&gt;
&lt;P&gt;I test it in my side , it seems work good for this dax .&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AAAM_Current_R12M = IF(ENDOFMONTH('Appointments Manager'[Period date])&amp;lt;&amp;gt;BLANK(), CALCULATE(([Sum_Two_Rows]), DATESINPERIOD('Calendrier'[Date], ENDOFMONTH('Appointments Manager'[Period date]), -12, MONTH)))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;AAAM_Prior_R12M = 
 var _cur= MAX('Calendrier'[Date])
 var _pre12 =YEAR( EOMONTH(_cur,-12))*100+MONTH( EOMONTH(_cur,-12))
 var min_date =YEAR( MINX( ALLSELECTED('Appointments Manager') , [Period date])) *100  +MONTH( MINX( ALLSELECTED('Appointments Manager') , [Period date]))
 return
IF(_pre12&amp;lt;min_date,BLANK(), CALCULATE([Sum_Two_Rows], DATESINPERIOD('Calendrier'[Date],ENDOFMONTH(dateadd('Appointments Manager'[Period date],-12,month)),-12,MONTH)))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for your need , you can just convert the bar chart to the Table visual so that we can see the measure reutrns that may return blank in your side .&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with your special &lt;STRONG&gt;sample data&lt;/STRONG&gt; and the &lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem. (You can also upload you &lt;STRONG&gt;sample .pbix [without sensitive data]&lt;/STRONG&gt; to the OneDrive and share with the OneDrive link to me ! )&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 04:09:07 GMT</pubDate>
    <dc:creator>v-yueyunzh-msft</dc:creator>
    <dc:date>2023-05-04T04:09:07Z</dc:date>
    <item>
      <title>Trouble Displaying Two Overlapping Line Graphs in Power BI using Dax functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trouble-Displaying-Two-Overlapping-Line-Graphs-in-Power-BI-using/m-p/3215531#M117387</link>
      <description>&lt;P&gt;Hello Power BI community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recently ran into an issue where I was trying to display two line graphs on top of one another in Power BI, but instead, they were being displayed as a single continuous graph line. The two functions that I was using were:&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AAAM_Prior_R12M = CALCULATE([Sum_Two_Rows], DATESINPERIOD('Calendrier'[Date],ENDOFMONTH(dateadd('Appointments Manager'[Period date],-12,month)),-12,MONTH))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AAAM_Current_R12M = CALCULATE(([Sum_Two_Rows]), DATESINPERIOD('Calendrier'[Date], ENDOFMONTH('Appointments Manager'[Period date]), -12, MONTH))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Period date is a date column of the table Appointments manager.&lt;BR /&gt;&lt;BR /&gt;I appreciate your assistance.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 11:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trouble-Displaying-Two-Overlapping-Line-Graphs-in-Power-BI-using/m-p/3215531#M117387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-02T11:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Displaying Two Overlapping Line Graphs in Power BI using Dax functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trouble-Displaying-Two-Overlapping-Line-Graphs-in-Power-BI-using/m-p/3219123#M117610</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Accoridng to your description, you put two measures on the viusal and it only show one measure.&lt;/P&gt;
&lt;P&gt;And for the [&lt;SPAN&gt;AAAM_Prior_R12M&lt;/SPAN&gt;] measure , it seems to get the the sum of the first 24 months of the current year to the previous 12 months.&lt;/P&gt;
&lt;P&gt;I test it in my side , it seems work good for this dax .&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AAAM_Current_R12M = IF(ENDOFMONTH('Appointments Manager'[Period date])&amp;lt;&amp;gt;BLANK(), CALCULATE(([Sum_Two_Rows]), DATESINPERIOD('Calendrier'[Date], ENDOFMONTH('Appointments Manager'[Period date]), -12, MONTH)))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;AAAM_Prior_R12M = 
 var _cur= MAX('Calendrier'[Date])
 var _pre12 =YEAR( EOMONTH(_cur,-12))*100+MONTH( EOMONTH(_cur,-12))
 var min_date =YEAR( MINX( ALLSELECTED('Appointments Manager') , [Period date])) *100  +MONTH( MINX( ALLSELECTED('Appointments Manager') , [Period date]))
 return
IF(_pre12&amp;lt;min_date,BLANK(), CALCULATE([Sum_Two_Rows], DATESINPERIOD('Calendrier'[Date],ENDOFMONTH(dateadd('Appointments Manager'[Period date],-12,month)),-12,MONTH)))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for your need , you can just convert the bar chart to the Table visual so that we can see the measure reutrns that may return blank in your side .&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with your special &lt;STRONG&gt;sample data&lt;/STRONG&gt; and the &lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem. (You can also upload you &lt;STRONG&gt;sample .pbix [without sensitive data]&lt;/STRONG&gt; to the OneDrive and share with the OneDrive link to me ! )&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 04:09:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trouble-Displaying-Two-Overlapping-Line-Graphs-in-Power-BI-using/m-p/3219123#M117610</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-05-04T04:09:07Z</dc:date>
    </item>
  </channel>
</rss>

