Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display negative numbers in brackets

Hi

On the front end, I want to show negative numbers is brackets.

for eg, the number   -1,100.65 , I want to display it as (1,100.65)

How do i do that?

Please help

kind regards

Nayan

1 Solution

Accepted Solutions
Gysbert_Wassenaar

On the Number tab of the properties screen select your expression and check Fixed to under Number Format Settings. Set the format pattern to #.##0,00; (#.##0,00)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
qv_jagan
Partner - Creator
Partner - Creator

Try this

=if(a < 0, '(' & fabs(a ) & ')', a)

where can be a list box or input field.

change  to list box or input field or value you have.

Not applicable
Author

Hi Jagan

Thanks.  I will try it out and let you know.

kind regards

Nayan

Gysbert_Wassenaar

On the Number tab of the properties screen select your expression and check Fixed to under Number Format Settings. Set the format pattern to #.##0,00; (#.##0,00)


talk is cheap, supply exceeds demand
christian77
Partner - Specialist
Partner - Specialist

Hi:

In general, copy the format from Number tab in Object Properties or Document Properties. This time, I typed those brackets and erased the minus sign. It works. If it is not currency, just erase the € sign.Formats.jpg

Not applicable
Author

Hi All

Thank you for your help.  It worked.

kind regards

Nayan

vlad_komarov
Partner - Specialist III
Partner - Specialist III

I've noticed this post while searching for a solution for my problem (Displaying negetive percentage values as (##%)).

Do you know why the standard aproach that you've suggested does not work for percentage values?

Would appreciate an expert's feedback.

Regards,

Vladimir