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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Font color and style for Expression Column value

Hi,

I have sum(Amounts) column as a Expression. My requirement is,

if sum(Amounts) has negative value , that negative value should be Red Color and that negative value in brackets like ( ).

How can i achieve this, could you please tell me Set expression and process

Thanks,

MLNR

13 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Use this as expression

=Num(Sum(Sales), '#,##0.00;(#,##0.00)')

and in number table select Expression Default option.

and for background color expand + sign of the expression and click on Background and give below expression

=If(Sum(Sales) > 0, RGB(255, 0, 0))

Hope this helps you.

Regards,

Jagan.

senpradip007
Specialist III
Specialist III

Try this

if(sum(Amounts) >=0, sum(Amounts), '(' & sum(Amounts) &')' )

Expend expressions and write the following expression "Background Color" section for background

if(sum(Amounts) <0, red(), black())

Not applicable
Author

Hi Jagan,

Thi expression is ok. But I want , negative number color is in red and negative number should be in brackets like ( ).

Thanks

MLNR

Not applicable
Author

Hi Pradip,

Thi expression is ok. But I want , negative number color is in red and negative number should be in brackets like ( ).

Thanks

MLNR

sunilkumarqv
Specialist II
Specialist II

Make use Expression as Num(sum(Amount),'#,##.#;(#,##.#) ; '))

and then go to + sign background expression

IF(Sign(Amount)='-1',Red())

senpradip007
Specialist III
Specialist III

Have you tried it?

jagan
Partner - Champion III
Partner - Champion III

Hi,

For coloring try like this

For Text color expand + sign of the expression and click on Text Color and give below expression

=If(Sum(Sales) > 0, RGB(255, 0, 0))

Regards,

Jagan.

senpradip007
Specialist III
Specialist III

Have a look on the attachment.

Anonymous
Not applicable
Author

Hi Narayana ,

Pradip Sen suggested is working