<?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: Using MIN/MAX function in measure, but the total doesn't add up as expected. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047157#M104786</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DemandSolars =
SUMX (
    VALUES ( 'Table'[Country] ),
    VAR SolarVerhouding_ =
        CALCULATE(MAX ( Verhoudingsgetallen[SolarVerhouding] ))
    VAR SensorForecast_ =
        CALCULATE(SUM ( 'Salesforce budgetForecasts'[Forecast__c] ))
    RETURN
        SolarVerhouding_ * SensorForecast_
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 13:38:12 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-01-27T13:38:12Z</dc:date>
    <item>
      <title>Using MIN/MAX function in measure, but the total doesn't add up as expected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3046939#M104771</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently facing an issue where my values don't add up as expected. I have a table with different ratio's per country, called Verhoudingsgetallen. Let's say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;SolarVerhouding&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;0,00194&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NZ&lt;/TD&gt;&lt;TD&gt;0,02944&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;0,03948&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NL&lt;/TD&gt;&lt;TD&gt;0,04854&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure I use is as following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DemandSolars = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; SolarVerhouding_ =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( Verhoudingsgetallen[SolarVerhouding] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; SensorForecast_ =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Salesforce budgetForecasts'[Forecast__c] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; SolarVerhouding_ * SensorForecast_&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I use the MAX function, because I want to have the specific value for the specific country used in my rows. The value I get per country is the correct one, but the total value is incorrect, since it uses the MAX SolarVerhouding number times the Forecast. However, I want the SUM of the individuals rows displayed as total. What can I do?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Jan 2023 10:06:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3046939#M104771</guid>
      <dc:creator>tonvhemert3</dc:creator>
      <dc:date>2023-01-27T10:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using MIN/MAX function in measure, but the total doesn't add up as expected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047157#M104786</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DemandSolars =
SUMX (
    VALUES ( 'Table'[Country] ),
    VAR SolarVerhouding_ =
        CALCULATE(MAX ( Verhoudingsgetallen[SolarVerhouding] ))
    VAR SensorForecast_ =
        CALCULATE(SUM ( 'Salesforce budgetForecasts'[Forecast__c] ))
    RETURN
        SolarVerhouding_ * SensorForecast_
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 13:38:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047157#M104786</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-01-27T13:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using MIN/MAX function in measure, but the total doesn't add up as expected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047195#M104790</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply. I've tried this, but now I get a really big number as my total. So I don't think this is the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 12:46:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047195#M104790</guid>
      <dc:creator>tonvhemert3</dc:creator>
      <dc:date>2023-01-27T12:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using MIN/MAX function in measure, but the total doesn't add up as expected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047288#M104797</link>
      <description>&lt;P&gt;I've updated my original post to force context transition, should be OK now I think&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 13:38:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3047288#M104797</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-01-27T13:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using MIN/MAX function in measure, but the total doesn't add up as expected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3054752#M105333</link>
      <description>&lt;P&gt;Thanks a lot. It works!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 09:29:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-MIN-MAX-function-in-measure-but-the-total-doesn-t-add-up/m-p/3054752#M105333</guid>
      <dc:creator>tonvhemert3</dc:creator>
      <dc:date>2023-02-01T09:29:45Z</dc:date>
    </item>
  </channel>
</rss>

