Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to write code for sales multiple by currency ?

Hi All

I have a sales table.My org code :

[Row Total] AS sales,

it have CURRENCY field :-
EUR
SGD
USD

I think the new code should be :-

if  (CURRENCY='USD' , [Row Total]*1.3),

if(CURRENCY='SGD' , [Row Total]*1),

if(CURRENCY='EUR' , [Row Total]*1.6) AS AMOUNT

But it cannot work.

Paul

1 Solution

Accepted Solutions
paulyeo11
Master
Master
Author

Hi Sir

Thanbk you very much for your help.  By the way some one have share with me the below script , and is working fine now.

([Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1)) as sales,

Paul 

 

View solution in original post

2 Replies
_armoco_
Partner - Creator II
Partner - Creator II

Hi Paul,

Can you describe the error that you are getting?

I can see that you have renamed [Row Total] as Sales? Perhaps use Sales instead of [Row Total]? Also are you closing off all the brackets of if condition?

paulyeo11
Master
Master
Author

Hi Sir

Thanbk you very much for your help.  By the way some one have share with me the below script , and is working fine now.

([Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1)) as sales,

Paul