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

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

Sunil Chauhan
Sxbbb
Creator III
Creator III
Author

 result is like this which is still not correct 

Sxbbb_0-1686897170922.png

Sxbbb_1-1686897198738.png

 

SunilChauhan
Champion II
Champion II

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

Sunil Chauhan
Sxbbb
Creator III
Creator III
Author

No, in case the minute is 00.

Sxbbb_0-1686898363514.png

 

SunilChauhan
Champion II
Champion II

00 should coms unders <10 minute. whats wrong with it?

Sunil Chauhan
Sxbbb
Creator III
Creator III
Author

Its value is 1hr 6s which exceeds 10 minutes should be green.

SunilChauhan
Champion II
Champion II

ok.try this

 

if( subfield(Time#([Over Time Machine],'hh:mm:ss'),':',2)<10  and subfield(Time#([Over Time Machine],'hh:mm:ss'),':',1)<1,

 

 

red(),rgb(50,205,50))

Sunil Chauhan
Sxbbb
Creator III
Creator III
Author

The value came out right, thank you very much.

SunilChauhan
Champion II
Champion II

Close this post by accepting as solution. moreover you may like the post if you want 🙂

Sunil Chauhan
Sxbbb
Creator III
Creator III
Author

What if I want from 11 minutes to 20 minutes in yellow?