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: 
Sxbbb
Creator III
Creator III

Want to add red in less than 10 minutes

If the time is less than 10 minutes, you want it to be green.

Now I tried the code : if(Time#([Over Time Machine],'hh:mm:ss') < Time#('00:10:00','hh:mm:ss') ,rgb(50,205,50))

Sxbbb_0-1686822665850.png

but the result is like this which is still not correct

Sxbbb_2-1686822804261.pngSxbbb_3-1686822841734.png

Want to add red in less than 10 minutes

Labels (4)
20 Replies
SunilChauhan
Champion II
Champion II

minute ( '09:14:36' )   return 14   use this function

 

if(Minute(Time#([Over Time Machine],'hh:mm:ss')) < 10,rgb(50,205,50))

Sunil Chauhan
NiTo
Creator
Creator

Hi Sunil.

I use the coding and it do gives the green color for the duration less than 10 mins but it do replace the timings with rgb(50,205,50)). I replaced it with the proper field, Over Time Machine, but than it gives the time in decimal format..

How to rectify it?

thanks

SunilChauhan
Champion II
Champion II

use   if(Floor(Minute(Time#([Over Time Machine],'hh:mm:ss')) )< 10,rgb(50,205,50))

Sunil Chauhan
NiTo
Creator
Creator

Hi,

Still showing rgb(50,205,50) instead of duration.

SunilChauhan
Champion II
Champion II

ok use this expression  in Color

 

if(Floor(Minute(Time#([Over Time Machine],'hh:mm:ss')) )< 10,rgb(50,205,50))

 

 

and this in  expression

Time#([Over Time Machine],'hh:mm:ss')

Sunil Chauhan
NiTo
Creator
Creator

Oh Yeah..

This works.

Thanks a lot Sunil.

SunilChauhan
Champion II
Champion II

Great ! mark this as a solution  to close this thread.

Sunil Chauhan
NiTo
Creator
Creator

Hi,

Query was posted by another user, i think that is why I am not getting an option to mark it as a solution.

Sxbbb
Creator III
Creator III
Author

I tried the code : if(Minute(Time#([Over Time Machine],'hh:mm:ss')) < 10,rgb(50,205,50))

Sxbbb_0-1686879519700.png

but the result is like this which is still not correct

Sxbbb_1-1686879609868.png

want to add red less than 10 minutes