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
It is difficult to understand your data model from your post. I would suggest you provide a very brief sample of the starting data table, and then a very brief sample of your goal/resulting data table. If these are table visuals already with measures - a picture of those if possible.