Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change number format via expression?

Hi;

I would like to change number format and font via edit expression mode.

how can i do it?

Thanks in advance...

1 Solution

Accepted Solutions
Not applicable
Author

You can change the number format using something like this:

=Num ( YourNumberValueField , '#,##0.00;(#,##0.00);-' )


The string that you use for the number format is pretty standard so I'm sure you can work out all the options you have there, one warning though, if your end-users do a lot of exporting to excel of this data, using the above formatting means that number formatting in excel will be removed.

I use a variable in place of the '#,##0.00' string, which then allows me to give buttons to the end-users so they can change decimal places etc, those buttons just change the variable.

As for changing the font in the same expression, no, I don't think it's possible. You can create expressions underneath the main expression that allows you to control the format and colour of the text, but not the font itself.

View solution in original post

2 Replies
Not applicable
Author

You can change the number format using something like this:

=Num ( YourNumberValueField , '#,##0.00;(#,##0.00);-' )


The string that you use for the number format is pretty standard so I'm sure you can work out all the options you have there, one warning though, if your end-users do a lot of exporting to excel of this data, using the above formatting means that number formatting in excel will be removed.

I use a variable in place of the '#,##0.00' string, which then allows me to give buttons to the end-users so they can change decimal places etc, those buttons just change the variable.

As for changing the font in the same expression, no, I don't think it's possible. You can create expressions underneath the main expression that allows you to control the format and colour of the text, but not the font itself.

Not applicable
Author

Thank you so much for your solution and advices...

It works as full