Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get text in bold and in color

Hello qlikers 🙂 ,

I have a table with date and with true/false.

It looks like:

Date                                 true/false
24.02.2020   08:08              1
25.02.2020   09:14              0
25.02.2020   15:12              0
26.02.2020   02:14              0

If the true/false is 0 then write 'NO', if it is 1 then write 'YES' for the max Date.
So it should only check the max Date, in my case it is 26.02.2020 02:14.

It should write NO in bold and red, YES in bold and green.

How could I do that?

I get the max of Date with

Max(Date)

 But how could I check if the true/false is 0 or 1 from the max date and then write yes or no, with color and bold?

Thank you in advance! Looking forward to reading some answers! 🙂

I wish you a good day! 

Labels (3)
1 Solution

Accepted Solutions
nisha_rai
Creator II
Creator II

Hi,

expression should be like that

if(only({<DateFieldNAme*={'$(=Timestamp(max(DateFieldNAme*)))'}>}[true/false])= 0,'YES','NO')

* Please use Date field which is in your data
like :- Date, CloseDate,OpenDate etc

View solution in original post

6 Replies
nisha_rai
Creator II
Creator II

Hi,

Yes/No with Bold is possible in Text box but with single color, if you want color then use the table box then bold font is not possible.

this is the expression which you have to use to check the TRUE/FALSE with Max Date

if(only({<Date={'$(=Date(max(Date)))'}>}[true/false])=0,'NO','YES')

right now i am using only the date as a date format(DD/MM/YYYY)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you share a sample data and qvf.

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Thank you very much!

But how can I consider the time by the date value.

It should get the max from date with time, it is only one field. For example: 26.02.2020 09:06. 🙂

Thank you in advance!

nisha_rai
Creator II
Creator II

Hi,

You can use the Timestamp function in place of date

Anonymous
Not applicable
Author

Thank you, but this didn't work

if(only({<TimeStamp={'$(=Date(max(Date)))'}>}[true/false])= 0,'YES','NO')
nisha_rai
Creator II
Creator II

Hi,

expression should be like that

if(only({<DateFieldNAme*={'$(=Timestamp(max(DateFieldNAme*)))'}>}[true/false])= 0,'YES','NO')

* Please use Date field which is in your data
like :- Date, CloseDate,OpenDate etc