Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mahitham
Contributor

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
New Contributor II

Re: Number format help

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.


6 Replies
jaumecf23
Contributor III

Re: Number format help

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

Fabs(Field_Name)

mahitham
Contributor

Re: Number format help

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
New Contributor II

Re: Number format help

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
New Contributor II

Re: Number format help

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
Contributor III

Re: Number format help

Hi Mahitha

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

Untitled.png

Untitled2.png

kuczynska
Contributor III

Re: Number format help

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

Community Browser