Forum Discussion
CanberkAcikbas
2 years agoRegular Visitor
Calculated New Currency column based on two tables
Calculated New Currency column based on two tables First table consists of Value of an Item(integer) like 100 Currency (string) like EUR , PLN, SEK Invoice date (date) like yyyy/mm ...
- 2 years ago
Hi CanberkAcikbas ,
you can try the following code for a new calculated column in Table 1.
AmountEUR = VAR _XChangeRate = LOOKUPVALUE ( Table2[XChangeRate], Table2[COD1], Table1[Currency], Table2[Date], Table1[InvoiceDate] ) VAR _Result = IF ( Table1[Currency] = "EUR", Table1[Item], Table1[Item] * _XChangeRate ) RETURN _ResultBr
ITManuel
2 years agoResponsive Resident
Hi CanberkAcikbas ,
you can try the following code for a new calculated column in Table 1.
AmountEUR =
VAR _XChangeRate =
LOOKUPVALUE (
Table2[XChangeRate],
Table2[COD1], Table1[Currency],
Table2[Date], Table1[InvoiceDate]
)
VAR _Result =
IF ( Table1[Currency] = "EUR", Table1[Item], Table1[Item] * _XChangeRate )
RETURN
_Result
Br
- CanberkAcikbas2 years agoRegular Visitor
Thank you so much for your quick responses, it worked perfectly fine !