Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I just like to share with all of you how to have multiple currency sign :-
+-----------------------------------------------------------------------------------------------------------------------------+
How to Display Currency Format
+-----------------------------------------------------------------------------------------------------------------------------+
Objective
Display Currency Fon the figure.
Convert the currency to common currency.
Step 1
Start declare Rate filed for user to select to display Org currency or SGD$ on Table:-
LOAD * INLINE [
What If Dimension Rate_GL, Column98
S$,Rate_GL
Org,Rate_GL_
];
Step 2
Create new variable for above at setting then go to variable overview :-
Name=ColumnDim98
Defination==text('[' & (Column98) & ']')
Step 3
Create a script for currency multipler , below example if user select SOURCE = TDSS which singpaore , therefore it will not convert the amount. since my base currency is Singapore.
LOAD * INLINE [
SOURCE_GL,Currency_GL, Rate_GL
TDSS,SGD, 1
ADL,SGD, 1
TDSPG,RM, 2.4
TDSID,ID,7000
TDSKL,RM, 2.4
TDST,THAI, 25
];
LOAD * INLINE [
SOURCE_GL,Currency_GL, Rate_GL_
TDSS,SGD, 1
ADL,SGD, 1
TDSPG,RM, 1
TDSID,ID, 1
TDSKL,RM, 1
TDST,THAI, 1
];
Step 4
Create a in line load for MoneyFormatK , This field will be use in your expression together with money.
Currencies_GL:
LOAD * INLINE [
SOURCE_GL: MoneyFormatK_GL:
TDSS: SG $#,##0 K;(SG $#,##0 K)
ADL: SG $#,##0 K;(SG $#,##0 K)
TDSKL: RM $#,##0 K;(RM $#,##0 K)
TDSPG: RM $#,##0 K;(RM $#,##0 K)
TDSID: ID $#,##0 K;(ID $#,##0 K)
TDST: TH $#,##0 K;(TH $ #,##0 K)
] (delimiter is ':');
Step 5
Create new variable for above at setting then go to variable overview :-
Variable Name :-
vMoneyFormatK_GL
Defination :-
=IF([What If Dimension Rate_GL] = 'Org' OR getselectedcount([What If Dimension Rate_GL]) <> 1, 'MoneyFormatK_GL', vWhatIfMoneyFormatK_GL)
Step 6
Create new variable for above at setting then go to variable overview :-
Variable Name :-
vWhatIfMoneyFormatK_GL
Defination :-
=chr(39) & [What If Dimension Rate_GL] & ' #,##0 K;(' & [What If Dimension Rate_GL] & ' #,##0 K)' & chr(39)
Step 7
Create a Table Expression using below script :-
money
(
Sum([Amount]/$(ColumnDim98)/1)
, $(vMoneyFormatK_GL)
)
Summary :-
When user select SOURCE data = TDSKL which is Malaysia , and when select Rate = Org , it will display in Malaysia Currency.
When user select SOURCE data = TDSKL which is Malaysia , and when select Rate = S$ , it will display in Singapore Currency.
QV Doc can be download from below link :-
+-----------------------------------------------------------------------------------------------------------------------------+
From Paul Yeo Hope this help.
+-----------------------------------------------------------------------------------------------------------------------------+