<?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 Aggregate average measure for calculating average YTD in Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-average-measure-for-calculating-average-YTD-in-Dax/m-p/3221291#M157099</link>
    <description>&lt;P&gt;I have a measure like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_DIFOT_MTD_Customer = 
    DIVIDE(
        CALCULATE(
            SUM('Annual Performance Keep Channel'[Value]),
            'Annual Performance Keep Channel'[Metric ID] = "52"
        ),
        CALCULATE(
            SUM('Annual Performance Keep Channel'[Value]),
            'Annual Performance Keep Channel'[Metric ID] = "37"
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the formula when I want to calculate YTD value instead of MTD value&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DIFOT ex NZ Customer MTD &amp;amp; YDT = IF(SELECTEDVALUE('YTD/MTD Selection'[YTD_MTD_Option]) = "MTD", [_DIFOT_MTD_Customer], CALCULATE([_DIFOT_MTD_Customer],DATESYTD(Dates[Date],"31/7")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expected that Power BI will calculate the MTD performance value of DIFOT, and then take the average. But what it did was take the sum of numerator and then divide the sum of the denominator, which will lead to a weighted average result.&lt;/P&gt;&lt;P&gt;Could anyone suggest me a way to fix this? Thank you so much&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2023 04:25:58 GMT</pubDate>
    <dc:creator>tgiang2840</dc:creator>
    <dc:date>2023-05-05T04:25:58Z</dc:date>
    <item>
      <title>Aggregate average measure for calculating average YTD in Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-average-measure-for-calculating-average-YTD-in-Dax/m-p/3221291#M157099</link>
      <description>&lt;P&gt;I have a measure like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_DIFOT_MTD_Customer = 
    DIVIDE(
        CALCULATE(
            SUM('Annual Performance Keep Channel'[Value]),
            'Annual Performance Keep Channel'[Metric ID] = "52"
        ),
        CALCULATE(
            SUM('Annual Performance Keep Channel'[Value]),
            'Annual Performance Keep Channel'[Metric ID] = "37"
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the formula when I want to calculate YTD value instead of MTD value&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DIFOT ex NZ Customer MTD &amp;amp; YDT = IF(SELECTEDVALUE('YTD/MTD Selection'[YTD_MTD_Option]) = "MTD", [_DIFOT_MTD_Customer], CALCULATE([_DIFOT_MTD_Customer],DATESYTD(Dates[Date],"31/7")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expected that Power BI will calculate the MTD performance value of DIFOT, and then take the average. But what it did was take the sum of numerator and then divide the sum of the denominator, which will lead to a weighted average result.&lt;/P&gt;&lt;P&gt;Could anyone suggest me a way to fix this? Thank you so much&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 04:25:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggregate-average-measure-for-calculating-average-YTD-in-Dax/m-p/3221291#M157099</guid>
      <dc:creator>tgiang2840</dc:creator>
      <dc:date>2023-05-05T04:25:58Z</dc:date>
    </item>
  </channel>
</rss>

