Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formatting the text color and format of an expression in a chart

Hi,

I am trying to format my expression so that if the date is > 45 days in the past it will display in red.

Here is my expression:

min( {1<KPI_No={1000000008} >} last_upd_dttm_latest )

In the chart properties in the expressions tab I expanded the expression and went to text color.  I entered this:

=if(min( {1<KPI_No={$(=vKPINo_MPFPurch)} >} last_upd_dttm_latest )-45, Red(), Black())

The value is displaying red regardless if it meets the criteria.  In my example last_upd_dttm_latest = 3-sep-12 which means it shouldn’t be red.

I’m also trying to format the text to be bold.  I’ve tried this in the text format section:

=if(min( {1<KPI_No={$(=vKPINo_MPFPurch)} >} last_upd_dttm_latest )-45, '<b>')

But I’m not having any luck with this.

Any help would be greatly appreciated.

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like this,

=if(Num(today()) - Num(min( {1<KPI_No={$(=vKPINo_MPFPurch)} >} last_upd_dttm_latest) ) > 45, Red(), Black())

hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi

Try like this,

=if(Num(today()) - Num(min( {1<KPI_No={$(=vKPINo_MPFPurch)} >} last_upd_dttm_latest) ) > 45, Red(), Black())

hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks so much - this is exactly what I needed.