Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change format in a text object

Hello,

I am trying to change format to a number to display currency. The bloew formula is in the text tab of a tect object:

=money#(sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)), '€#,##0')

The formula works for the sum but not for the money#. Can you please advice on how to do this?

Thanks

Matteo

6 Replies
Not applicable
Author

I think you want money(), not money#(). According to the tool tip, money#() is for converting text to money, whereas money() converts a number to money.

You could also probably use num().

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi Matteo,

The format string in Money# function (as with Num# and Date#) defines the format of the incoming value - so if you were reading a text value that had a currency value in it the you use the Money#. What you need to use is the plain Money function. (In fact Num will work too).

Regards,

Stephen

Not applicable
Author

Thanks for your reply.

I have tried with and without # for money() and num() but it does not work.

In the text tab I have 3 sums (as below)

Does that matter? It should not.

=money#(sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)), '€#,##0') + money#(sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)), '€#,##0') + money#(sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)), '€#,##0')

Thanks again,

Matteo

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

I presume that sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)) returns a numeric value? If so, you don't need to use Money#. Money# works on text values. Money works on numeric values. See my previous post.

I would change your expression to read:

=money(sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle))
+ sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle))
+ sum ( if (vButtonColour = 'Yesterday' AND FlagYesterday =1, csi_eur_handle)), '€#,##0')

However, all 3 sums appear to be the same - is that correct?

Regards,

Stephen

Not applicable
Author

Thanks Stephen. It works now.

Just a single money() function before the whole expression. Thansk again.

Matteo

Not applicable
Author

Thank you! This is exactly what I need.