Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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

20 Replies
SunilChauhan
Champion II
Champion II

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

red(),

if( subfield(Time#([Over Time Machine],'hh:mm:ss'),':',2)>=11  and  subfield(Time#([Over Time Machine],'hh:mm:ss'),':',2)<=20 and subfield(Time#([Over Time Machine],'hh:mm:ss'),':',1)<1, Yellow(),

 

rgb(50,205,50)))

Sunil Chauhan