Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use Format command

Hello All.

This issue is disturbing me.

I wld lik to format an amount in a text object

I use this expressions : = Money(Only(TOT_AMOUNT),'XAF #,##0.00;XAF #,##0.00)'). It works well. XAF is a currency.

But to globalize that expression, all my currecies are loaded in the field CCY, and i can get it by the following expression : = Only(CCY).

When i use this expression : = Money(Only(TOT_AMOUNT),'Only(CCY) #,##0.00;Only(CCY) #,##0.00)'). I have the screenshot below which is not correct display:

Wrong.bmp

May be there is a strategy to map that Only(CCY) to have the correct display.

Please your help on that

Regards

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

Money(Sum(Amount),vCurr&'$#,#00'))

where vCurr = GetFieldSelections(CurrencyField)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

9 Replies
Not applicable
Author

Hi,

using text object, you can display any one currency, when you sum all the amounts having different currencies, which currency you want to display ?

Regards

Not applicable
Author

Hai

You didn't get me.

the expression =Only(CCY) can give more than 5 currencies (XAF,XOF,USD,EUR,JPY,...).

I would like that when the user select one of those currency, the value change automatically.

Thanks in adavnce for your help

Not applicable
Author

declare a variable vCCY=getfieldselections(CCY) & use it in place of only(CCY) in ur expression.

Hope it helps

Regards

Not applicable
Author

Dear qlik_techie.

Let see the result below

ccy.bmp

I think it's because that expression is used in a string.

How may i match an expression in a string by taking only the return value?

That is the question.

Thank in advance for your help

Not applicable
Author

hai qlik_techie

Nothing special without $ , see the screenshot

res.bmp

I think it's because that expression is used in a string.

How may i match an expression in a string by taking only the return value?

That is the question.

Standing by for your help

MayilVahanan

Hi

Please check the attached file..

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi Mayil,

Please i'm unable to open the file bcoz i'm using Qlikview Personal Edition.

If there is an expression, please paste it here. I 'll test it

Regards

MayilVahanan

HI

Try like this

Money(Sum(Amount),vCurr&'$#,#00'))

where vCurr = GetFieldSelections(CurrencyField)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi all.

I think the key was to know that "&" is the character used to concatenate the fields.

I use this expression

= Money(Only(TOT_AMOUNT), Only(CCY)&' #,##0.00;(' & Only(CCY) &' #,##0.00)')

I thank all the team for your help.