Forum Discussion
Arnaud31450
4 years agoFrequent Visitor
Multiply based on currency check
Hi everyone, I have values in the table "Price List item" stored as local currencies "Range1_c" e.g. 1,000 In this table I have "CurrencyIsoCode" e.g. EUR In another Table "Table" I have val...
- 4 years ago
Arnaud31450 can you try this measure
Measure = CALCULATE ( SUMX ( 'Price List item', VAR _0 = 'Price List item'[Range1_c] VAR _1 = CALCULATE ( MAX ( 'Table'[Fxb Rate 2022] ), TREATAS ( VALUES ( 'Price List item'[CurrencyIsoCode] ), 'Table'[Currency] ) ) RETURN _0 * _1 ) ) - 4 years ago
Arnaud31450 looks like you missed a comma after SUMX ('Price List item'
Measure =
CALCULATE (
SUMX (
'Price List item',
VAR _0 = 'Price List item'[Range1_c]
VAR _1 =
CALCULATE (
MAX ( 'Table'[Fxb Rate 2022] ),
TREATAS ( VALUES ( 'Price List item'[CurrencyIsoCode] ), 'Table'[Currency] )
)
RETURN
_0 * _1
)
)
v-yalanwu-msft
Community Support
4 years agoHi, Arnaud31450 ;
You could create a measure as follows:
Range1_USD = SUM('Table'[Fxb Rate 2022])*CALCULATE( SUM('Price List item'[Range1_c]),FILTER('Price List item',[CurrencyIsoCode]=MAX('Table'[Currency])))
The final output is shown below:
If this formula does not apply to your data, can you share the relationship of your data or more details?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.