Forum Discussion
tonvhemert3
3 years agoRegular Visitor
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...
- 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_ )
johnt75
Super User
3 years agoTry
DemandSolars =
SUMX (
VALUES ( 'Table'[Country] ),
VAR SolarVerhouding_ =
CALCULATE(MAX ( Verhoudingsgetallen[SolarVerhouding] ))
VAR SensorForecast_ =
CALCULATE(SUM ( 'Salesforce budgetForecasts'[Forecast__c] ))
RETURN
SolarVerhouding_ * SensorForecast_
)
- tonvhemert33 years agoRegular Visitor
Hi John,
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.
- johnt753 years ago
Super User
I've updated my original post to force context transition, should be OK now I think
- tonvhemert33 years agoRegular Visitor
Thanks a lot. It works!