Forum Discussion

tonvhemert3's avatar
tonvhemert3
Regular Visitor
3 years ago
Solved

Using MIN/MAX function in measure, but the total doesn't add up as expected.

Hi,   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:   Country SolarVerhoud...
  • johnt75's avatar
    3 years ago

    Try

     

    DemandSolars =
    SUMX (
        VALUES ( 'Table'[Country] ),
        VAR SolarVerhouding_ =
            CALCULATE(MAX ( Verhoudingsgetallen[SolarVerhouding] ))
        VAR SensorForecast_ =
            CALCULATE(SUM ( 'Salesforce budgetForecasts'[Forecast__c] ))
        RETURN
            SolarVerhouding_ * SensorForecast_
    )