<?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 SumTotal Currency Conversion in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/SumTotal-Currency-Conversion/m-p/808591#M20972</link>
    <description>&lt;P&gt;Hi, I am doing a currency conversion with a double lookup that matches on both currency and time. This works fine for the individual rows in the table, however, the sumtotal is wrong. I found that one has to treat sumtotals separately, and that HASONEVALUE() is a good function to ensure this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is what DAX formula to use for the sumtotal, marked as &lt;STRONG&gt;"?"&amp;nbsp;&lt;/STRONG&gt;in the formula below. I have tried several different methods using SUMX(), but I haven't been able to solve it.&lt;/P&gt;&lt;P&gt;Also, I have scoured the web for tutorials and solutions but all currency conversion tutorials seem to have the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that there is also a filtering here between currency selection "NOK" and "Local Currency".&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Curr_adj_value = SWITCH(TRUE();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Currency selection]="NOK";IF(HASONEVALUE('CapEX Documents'[Budget]);SUM('CapEX Documents'[Budget])*LOOKUPVALUE('Currencies'[NOK per unit];'Currencies'[Currency];MAX('CapEX Documents'[Currency]);'Currencies'[Year];YEAR(MAX('CapEX Documents'[Scheduled start])));&lt;STRONG&gt;"?"&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Currency selection]="Local Currency"; SUM('CapEX Documents'[Budget]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Oct 2019 07:02:20 GMT</pubDate>
    <dc:creator>oslosa</dc:creator>
    <dc:date>2019-10-03T07:02:20Z</dc:date>
    <item>
      <title>SumTotal Currency Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/SumTotal-Currency-Conversion/m-p/808591#M20972</link>
      <description>&lt;P&gt;Hi, I am doing a currency conversion with a double lookup that matches on both currency and time. This works fine for the individual rows in the table, however, the sumtotal is wrong. I found that one has to treat sumtotals separately, and that HASONEVALUE() is a good function to ensure this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is what DAX formula to use for the sumtotal, marked as &lt;STRONG&gt;"?"&amp;nbsp;&lt;/STRONG&gt;in the formula below. I have tried several different methods using SUMX(), but I haven't been able to solve it.&lt;/P&gt;&lt;P&gt;Also, I have scoured the web for tutorials and solutions but all currency conversion tutorials seem to have the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that there is also a filtering here between currency selection "NOK" and "Local Currency".&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Curr_adj_value = SWITCH(TRUE();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Currency selection]="NOK";IF(HASONEVALUE('CapEX Documents'[Budget]);SUM('CapEX Documents'[Budget])*LOOKUPVALUE('Currencies'[NOK per unit];'Currencies'[Currency];MAX('CapEX Documents'[Currency]);'Currencies'[Year];YEAR(MAX('CapEX Documents'[Scheduled start])));&lt;STRONG&gt;"?"&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Currency selection]="Local Currency"; SUM('CapEX Documents'[Budget]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Oct 2019 07:02:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/SumTotal-Currency-Conversion/m-p/808591#M20972</guid>
      <dc:creator>oslosa</dc:creator>
      <dc:date>2019-10-03T07:02:20Z</dc:date>
    </item>
  </channel>
</rss>

