Forum Discussion
IF statement with SUM
- Anonymous9 years ago
Hi elkjoperik,
According to your description, you want to transfer “LOC” currency to “worldwide” currency when “SALESCHANNEL” is chain, right?
You can follow the sample below:
I create two test tables.
Currency:
Sales:
Notice: type is the currency type.Write the measure to calculate the current sales price.
Sales USD =
var channel=LASTNONBLANK(Sales[SALESCHANNEL],Sales[SALESCHANNEL])
var currentAmount=MAX(Sales[Amount])
var USDRate= LOOKUPVALUE('Currency'[World Wide],'Currency'[ID],MAX(Sales[Type]))
return
if(channel="chain", currentAmount / 100 * USDRate, currentAmount)Add a table visual to display the result.
If above is not help, please provide more detail info about your requirement.
Regards,
Xiaoxin Sheng
Hi elkjoperik,
According to your description, you want to transfer “LOC” currency to “worldwide” currency when “SALESCHANNEL” is chain, right?
You can follow the sample below:
I create two test tables.
Currency:
Sales:
Notice: type is the currency type.
Write the measure to calculate the current sales price.
Sales USD =
var channel=LASTNONBLANK(Sales[SALESCHANNEL],Sales[SALESCHANNEL])
var currentAmount=MAX(Sales[Amount])
var USDRate= LOOKUPVALUE('Currency'[World Wide],'Currency'[ID],MAX(Sales[Type]))
return
if(channel="chain", currentAmount / 100 * USDRate, currentAmount)
Add a table visual to display the result.
If above is not help, please provide more detail info about your requirement.
Regards,
Xiaoxin Sheng
Awesome, thanks!