<?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: Total with SUM instead of MAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2320027#M57930</link>
    <description>&lt;P&gt;Most likely you will need to use PRODUCTX&amp;nbsp; to account for the rate changes.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 14:37:55 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-02-04T14:37:55Z</dc:date>
    <item>
      <title>Total with SUM instead of MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2318192#M57835</link>
      <description>&lt;P&gt;I have an issue in my data model with calculation of totals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My inputs are following:&lt;/P&gt;&lt;P&gt;- burnt effort per resource and day (in hours)&lt;/P&gt;&lt;P&gt;- scheduling report (roster with resource details)&lt;/P&gt;&lt;P&gt;- rate card with different loaded cost rate (LCR) per each activity type and country&lt;/P&gt;&lt;P&gt;- exchange rate for each currency on monthly level&lt;/P&gt;&lt;P&gt;- mapping table of countries and their currencies&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am trying to get the cost calculated in USD, considering that the rates differ every month.&lt;/P&gt;&lt;P&gt;The measure calculates properly on resource level, but not when summing on month level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I understand, that the reason is, that the measure calculates MAX of the rate and when all the monthly values are summed, only the highest exchange rate is considered. However, I cannot figure out how to change the measure to SUM the calculations on total level instead of calculating it separately.&lt;BR /&gt;&lt;BR /&gt;I have tried to follow the currency conversion example from DAX Patterns (&lt;A href="https://www.daxpatterns.com/currency-conversion/" target="_blank" rel="noopener"&gt;link&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Costs USD:=VAR AggregatedCostsInCurrency =
	ADDCOLUMNS(
		SUMMARIZE(
			Actuals,
			'Calendar'[Year_Month],
			Actuals[Name]
		),
		"@CostsAmountInCurrency",[Costs (internal)],
		"@Rate", CALCULATE(
			MAX(ExchangeRates[Rate]))	
			)
VAR CostUSD =
	SUMX (
		AggregatedCostsInCurrency,
		DIVIDE([@CostsAmountInCurrency],[@Rate])
	)
RETURN
	CostUSD&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Here is the diagram view of my simplified data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 17:21:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2318192#M57835</guid>
      <dc:creator>MalyMajo</dc:creator>
      <dc:date>2022-02-03T17:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Total with SUM instead of MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2320027#M57930</link>
      <description>&lt;P&gt;Most likely you will need to use PRODUCTX&amp;nbsp; to account for the rate changes.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 14:37:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2320027#M57930</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-02-04T14:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Total with SUM instead of MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2336804#M58895</link>
      <description>&lt;P&gt;PRODUCTX kept giving me same results. However, I have reworked all the measures and it seems to work now.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 11:29:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-with-SUM-instead-of-MAX/m-p/2336804#M58895</guid>
      <dc:creator>MalyMajo</dc:creator>
      <dc:date>2022-02-14T11:29:33Z</dc:date>
    </item>
  </channel>
</rss>

