Forum Discussion
jasgun
9 years agoFrequent Visitor
Arrange Data
Hi all, I have the below setup. What I'm trying to get to is if the user selects "QTREND" from the rate type slicer, I would like a new measure "AMT-GBP" to calculate the "AMT" converted to ...
- 9 years ago
We can use LOOKUPVALUE Function (DAX) to lookup the corresponding RoE in another table with no relationship.
AMT-GBP = VAR SelectedRate = IF ( HASONEVALUE ( RoE[Rate Type] ), VALUES ( RoE[Rate Type] ) ) VAR CurrentCCY = CALCULATE ( LASTNONBLANK ( Policy[CCY], Policy[CCY] ) ) RETURN CALCULATE ( SUM ( Policy[AMT] ) / LOOKUPVALUE ( RoE[RoE], RoE[Rate Type], SelectedRate, RoE[CCY], CurrentCCY ) )Best Regards,
Herbert
v-haibl-msft
9 years agoMicrosoft Employee
We can use LOOKUPVALUE Function (DAX) to lookup the corresponding RoE in another table with no relationship.
AMT-GBP =
VAR SelectedRate =
IF ( HASONEVALUE ( RoE[Rate Type] ), VALUES ( RoE[Rate Type] ) )
VAR CurrentCCY =
CALCULATE ( LASTNONBLANK ( Policy[CCY], Policy[CCY] ) )
RETURN
CALCULATE (
SUM ( Policy[AMT] )
/ LOOKUPVALUE ( RoE[RoE], RoE[Rate Type], SelectedRate, RoE[CCY], CurrentCCY )
)
Best Regards,
Herbert
jasgun
9 years agoFrequent Visitor
Perfect, thanks again Herbert!