Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
da_pagnott
New Contributor III

Formatting Negative Numbers

Hello!

I need to set a red format to negative numbers in one table inside my dashboard.

I tried to set the format but without success. Could you please help me?

Actually this is my format:

#.##0 €;-(#.##0 €)

I'd like to set in red negative values.

 

Thank you!

Labels (4)
3 Solutions

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Formatting Negative Numbers

It's not possible to set the color with the format string. If you're using a KPI object you can enable the Conditional colors option of the measure(s) and specify which values should get which colors. In a table object you can use the Text Color expression option of the measure(s) for that purpose.


talk is cheap, supply exceeds demand
Partner
Partner

Re: Formatting Negative Numbers

Put the expression in a variable and call the variable

if($(vForumla)<0,red())

da_pagnott
New Contributor III

Re: Formatting Negative Numbers

Ok, thanks!!

Just to close this post, I find this video to know how to set a variable.

https://www.youtube.com/watch?v=uFT-PNf_z9g

6 Replies
Partner
Partner

Re: Formatting Negative Numbers

Your aim is not clear.

Can you elaborate what u have and want to have with a screen shot maybe?

MVP & Luminary
MVP & Luminary

Re: Formatting Negative Numbers

It's not possible to set the color with the format string. If you're using a KPI object you can enable the Conditional colors option of the measure(s) and specify which values should get which colors. In a table object you can use the Text Color expression option of the measure(s) for that purpose.


talk is cheap, supply exceeds demand
da_pagnott
New Contributor III

Re: Formatting Negative Numbers

Great I made it!

One more question about it please. I made the formula to mark in red negative numbers and it works.

This is my expression (to fill the table column):

=sum({<DocDta = {"$(=yesterday)"}>} TotalBalance)

And this is the expression to mark in red negative values:

If(sum({<DocDta = {"$(=yesterday)"}>} TotalBalance)<0,red())

Do I have any way to make the second expression shorter instead of writing again the expression of the column?

I mean something like that:

If(FORMULA RESULT<0,red())

Thank you for your help!

thannila
Contributor

Re: Formatting Negative Numbers

Hi,

Use the text color option while writing the measure in qlik sense straight table object.

if(sum(amount)<0,red())

Partner
Partner

Re: Formatting Negative Numbers

Put the expression in a variable and call the variable

if($(vForumla)<0,red())

da_pagnott
New Contributor III

Re: Formatting Negative Numbers

Ok, thanks!!

Just to close this post, I find this video to know how to set a variable.

https://www.youtube.com/watch?v=uFT-PNf_z9g