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

Number format help

Hi Experts,

Can any one please help me on below requirement.

In straight table for value of usage dimension I have some negative values.

these values I have to represent in bracket with red color like below.

Please help me on this.

negative values.png

Thanks in advance.

1 Solution

Accepted Solutions
ali_qlikview
Partner - Contributor II
Partner - Contributor II

Hi,

Can you try something like this

Suppose A is the field or Expression Then

=if(A<0,NUm(Fabs(A),'(#,##0)'),Num(A,'#,##0'))


for the color you can use text color option:


if( A<0,red(),Green())



Thanks,

Mukram.


View solution in original post

6 Replies
jaumecf23
Creator III
Creator III

You can do a Calculated dimension using the Fabs() function. This function converts the negative values to positive.

Fabs(Field_Name)

mahitham
Creator II
Creator II
Author

Hi,

Thanks for your reply .

Its converting negative to positive but that negative conversion values need to show like (93.27) by highlighting in red font.

palanimurugan
Contributor III
Contributor III

Hi..

Use below expression.

For Convert Positive Value:

=Num(fabs(Your_Column Name),'###.0')

For Changing color:  (Please click the expression tab and select the text color add below expression

=if(Your_column_Name<0,RGB(255,0,0))

color.png)

ali_qlikview
Partner - Contributor II
Partner - Contributor II

Hi,

Can you try something like this

Suppose A is the field or Expression Then

=if(A<0,NUm(Fabs(A),'(#,##0)'),Num(A,'#,##0'))


for the color you can use text color option:


if( A<0,red(),Green())



Thanks,

Mukram.


kaanerisen
Creator III
Creator III

Hi Mahitha

You can do that by using format pattern on chart measure settings.

Untitled.png

Untitled2.png

kuczynska
Creator III
Creator III

Yeah, I would follow Kaan's approach rather than using the absolute value function fab().