Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

Hi All

I have expression from Kaushik it work fine :-

'S$ ' &Num(

sum(If ( US_Cust='USD', 1.3,if(US_Cust='EU',1.5, 1)) * days3)

+ sum(If ( US_Cust='USD', 1.3,if(US_Cust='EU',1.5, 1)) * days6) +

sum(If ( US_Cust='USD', 1.3,if(US_Cust='EU',1.5, 1)) * days9) +

sum(If ( US_Cust='USD', 1.3,if(US_Cust='EU',1.5, 1))*above12)+

sum(If ( US_Cust='USD', 1.3,if(US_Cust='EU',1.5, 1)) * curren)

,'###,##0.00')

I need to add one more currency RP to above expression :-

'S$ ' &Num(

sum(

If( US_Cust='USD', 1.3,

If( US_Cust='RP', 0.0001,

if( US_Cust='EU',1.5, 1)))* days3)

+ sum(

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.00001,

if ( US_Cust='EU',1.5, 1))) * days6)

+sum(

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.00001,

if ( US_Cust='EU',1.5, 1))) * days9)

+sum(

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.00001,

if ( US_Cust='EU',1.5, 1)))*above12)

+sum(

If ( US_Cust='USD', 1.3,

If ( US_Cust='RP', 0.00001,

if ( US_Cust='EU',1.5, 1))) * curren)

,'###,##0.00')

But it display wrong amount SGD 479.14 , it should display some where SGD$ 700.

Paul

1 Solution

Accepted Solutions

Re: How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

HI,

Check your expression. It seems the value of RP is not same across.

In Day3 you are using 0.0001 where as for other you are using 0.00001.

Regards,

Kaushik Solanki

4 Replies
paulyeo11
Valued Contributor II

Re: How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

my qvw

Re: How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

The expression seems correct, probably the number 0.00001 is too llittle to be multiplied so it is rounded to zero.

try to substitute the number 0.00001 with another number (E.G. 1.1) and verify if expression works. if it does then use Round(nnn, nnnnn) before the Sum (function)

Re: How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

HI,

Check your expression. It seems the value of RP is not same across.

In Day3 you are using 0.0001 where as for other you are using 0.00001.

Regards,

Kaushik Solanki

paulyeo11
Valued Contributor II

Re: How to make my Total Amount currency convert from RP 7,353,062.00 * 0.0001 = SGD $ 735 Now only display SGD 479.14

Hi Kau

You are right , you spot the mistake i make , all should be 0.0001 and not 0.00001 , like aless mentioned .

Community Browser