<?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: Need Trended Chart for MAT calculation in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Trended-Chart-for-MAT-calculation-in-Power-BI/m-p/3061739#M105829</link>
    <description>&lt;P&gt;Please provide sample data that covers your issue or question completely. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2023 19:29:26 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-02-04T19:29:26Z</dc:date>
    <item>
      <title>Need Trended Chart for MAT calculation in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Trended-Chart-for-MAT-calculation-in-Power-BI/m-p/3059895#M105670</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I need to form a trended chart of last 12 months depending on the slicer selection from the user, for one of the MAT calculation. MAT calculation looks like below, here I am using Calendar2 table to find out MAT sum according to month selection, suppose if I have selected Nov 2022 in month slicer(of Calendar table) then it will give me Dec 2021 to Nov 2022 in Calendar2 table. Connection between Calendar and Calendar2 table is inactive -&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;var a=MAX(Calendar[Date])

var preious_dates=DATESINPERIOD(Calendar2[Date],a,-12,MONTH)


var Ours=CALCULATE(SUM(Market_Share_Brands[value]),Market_Share_Brands[manufacturer]="Ours",Market_Share_Brands[channels]="D - Commerce",REMOVEFILTERS('Calendar'),
KEEPFILTERS(preious_dates),USERELATIONSHIP('Calendar'[Date],Calendar2[Date]))

var Others=CALCULATE(SUM(Market_Share_Brands[Value]),Market_Share_Brands[Manufacturer]&amp;lt;&amp;gt;"Ours",Market_Share_Brands[Channels]="D - Commerce",REMOVEFILTERS('Calendar'),
KEEPFILTERS(preious_dates),USERELATIONSHIP('Calendar'[Date],Calendar2[Date]))

return DIVIDE(Ours,(Others+Ours))&lt;/PRE&gt;&lt;P&gt;So this thing is working fine if I want to show particular month's MAT value, but if I need to show trended chart for last 12 months then it filters out the month that is being selected and not the last 12 months. What should I do to get last 12 month's MAT numbers in trended chart?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Feb 2023 08:19:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Trended-Chart-for-MAT-calculation-in-Power-BI/m-p/3059895#M105670</guid>
      <dc:creator>Composed_MS</dc:creator>
      <dc:date>2023-02-03T08:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need Trended Chart for MAT calculation in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Trended-Chart-for-MAT-calculation-in-Power-BI/m-p/3061739#M105829</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question completely. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 19:29:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Trended-Chart-for-MAT-calculation-in-Power-BI/m-p/3061739#M105829</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-02-04T19:29:26Z</dc:date>
    </item>
  </channel>
</rss>

