Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
da_pagnott
Contributor III
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 (3)
3 Solutions

Accepted Solutions
Gysbert_Wassenaar

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

View solution in original post

OmarBenSalem

Put the expression in a variable and call the variable

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

View solution in original post

da_pagnott
Contributor III
Contributor III
Author

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

View solution in original post

6 Replies
OmarBenSalem

Your aim is not clear.

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

Gysbert_Wassenaar

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

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
Creator
Creator

Hi,

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

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

OmarBenSalem

Put the expression in a variable and call the variable

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

da_pagnott
Contributor III
Contributor III
Author

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