Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
laf4t
Contributor II
Contributor II

I am trying to count duration bigger than hh:00 45mins

My sample data is

 

Type of service      Duration      ID

Love                          00:45            002

Kiss                           00:30           004

Kiss                           00:46          003

Love                          00:30          009

Hug                           00:44            011

Hug                           00:48            023

 

I'm trying to count the amount of services that are 'Love' which duration are more than 00:45. I have this code written but its not pulling the duration >= 00:45, its pulling all of them

count(if([Type of Service] = 'Love' and [Duration] >= '00:45' , [ID]))

1 Solution

Accepted Solutions
Saravanan_Desingh

then try this.

count(if([Type of service] = 'Love' and [Duration] >= num(45) , [ID]))*90

View solution in original post

7 Replies
Saravanan_Desingh

Your input header shows [Type of service]. But your Expression shows [Type of Service] . Can you check the upper case?

Your query is working for me.

laf4t
Contributor II
Contributor II
Author

Sorry, i figured it out sec after I added this posted. What worked for me is

 

count(if([Type of service] = 'Love' and [Duration] >= num(45) , [ID]))

I was going to delete this post but I'll leave it on here just in case someone else needs it.

laf4t
Contributor II
Contributor II
Author

but then I am trying to multiply by 90 like this below

 

count(if([Type of service] = 'Love' and [Duration] >= num(45) , [ID]*90))

 

but this is not working for me .. please help

Saravanan_Desingh

Are you trying to multiply 90 with ID or with the Count?

laf4t
Contributor II
Contributor II
Author

I am trying to multiply with the count

sergio0592
Specialist III
Specialist III

Hi, try with :

=count(if(num(Duration)>='$(=45/1440)' and [Type of service]='Love',ID))
Saravanan_Desingh

then try this.

count(if([Type of service] = 'Love' and [Duration] >= num(45) , [ID]))*90