Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
yoganantha321
Creator II
Creator II

Number format in expression

Hi,

I have field JOB_RESPTIME as date and time as shown in fig 1:

Screenshot_82.png

On properties I have changed to interval as mm for minutes as per my requirementScreenshot_84.png

now it is displaying as shown in fig 3 as below 684 minutes.

Screenshot_83.png

But i am using the JOB_RESPTIME in expression for chart for categorize.

Expression:

IF(JOB_RESPTIME <=30,  fieldname)

IF(JOB_RESPTIME >30,  fieldname)

As shown in fig 1 since it is less than <1 it is showing in category less than 30.

Actually it is 684 it should be shown in greater than 30.

Anyone can help me !!!

Regards,

Yoganantha Prakash G P

1 Solution

Accepted Solutions
sunny_talwar

May be try this

If(JOB_RESPTIME <=MakeTime(0, 30),  fieldname)

If(JOB_RESPTIME > MakeTime(0, 30),  fieldname)

View solution in original post

7 Replies
Anil_Babu_Samineni

You are showing expression number format, Does this format only in Front end. But whole expression you have original values only

Try like below

IF(Interval(JOB_RESPTIME,'mm') <=30,  fieldname)

IF(Interval(JOB_RESPTIME,'mm') >30,  fieldname)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

May be try this

If(JOB_RESPTIME <=MakeTime(0, 30),  fieldname)

If(JOB_RESPTIME > MakeTime(0, 30),  fieldname)

vishsaggi
Champion III
Champion III

May be this?

= IF(Interval(Job_Resp_TIme, 'mm')  <=  Interval(30/(3600*24), 'mm'), FieldName1,

   IF(Interval(Job_Resp_TIme, 'mm')  > Interval(30/(3600*24), 'mm'), FieldName2))

sunny_talwar

I think you are converting 30 into seconds by dividing it by 3600*24. I think you need to divide by 60*24 for minutes.

=Interval(30/(60*24), 'mm')

antoniotiman
Master III
Master III

May be

If(JOB_RESPTIME <= 0.02084,Fieldname)

Time(0.02084) -> 00:30:00

Regards,

Antonio

vishsaggi
Champion III
Champion III

OOps that is correct it should be 60*24. My bad. Thanks for the correction Sunny.

vishsaggi
Champion III
Champion III

COrrected.

= IF(Interval(Job_Resp_TIme, 'mm')  <=  Interval(30/(60*24), 'mm'), FieldName1,

   IF(Interval(Job_Resp_TIme, 'mm')  > Interval(30/(60*24), 'mm'), FieldName2))