Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a KPI that shows how many items were finished within specific time ranges

Hi all

So, want I want to do is create a KPI that lets us know how many items were finished during our overtime periods (07:45 to 09:00).

I have job_instance_end_time_b which I have successfully used a table, but I am unsure how to write it up as a formula to filter between these times in a KPI.

Count({$<job_instance_end_time_b={'>7:45<9:00'}>}job_instance_end_time_b) is what I have so far, but this is not working as I had hoped (still learning this stuff!)

Thanks!

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Robert,

In your load script try replacing

Time (end_time) as job_instance_end_time_b

with

Time (Frac(end_time)) as job_instance_end_time_b

As it stands the expression

Count(if(Time(Frac(job_instance_end_time))> '07:45' and Time(Frac(job_instance_end_time))< '09:00', job_instance_end_time_b))

returns a value of 13423.

Regards

Andrew

View solution in original post

21 Replies
Anil_Babu_Samineni

We are not know about data set? Some how try to use double quotes

Count({$<job_instance_end_time_b={">7:45<9:00"}>}job_instance_end_time_b)

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
Not applicable
Author

Sorry, not sure what you mean about data set? I have tried what you have put and it is not working.

Anil_Babu_Samineni

I mean how this field looks like? job_instance_end_time_b. Would you provide some sample file

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
Anil_Babu_Samineni

For first one, Assume there is no values between the arbitrary. Can you check the values in text object where i define

Count({$<job_instance_end_time_b= {">=$(=Var1) <=$(=Var2)"}>}job_instance_end_time_b)

For second one

Count(${<job_instance_end_time_b={'>09:00'}>}job_instance_end_time_b)

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
Not applicable
Author

The first one comes up with 0, the second one seems to just count everything.

I know there is data within those ranges, as if I try to just look at specific times (like 8:45 for example) it comes up with a number that I would expect.

Anil_Babu_Samineni

May be manipulate this in script and reload for a while with in my application where i attach earlier

Load ...., ..., ...., Time(job_instance_end_time_b, 'hh:mm') as job_instance_end_time_b

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
Not applicable
Author

Put that in the data load editor, didn't seem to do anything (had to get rid of the ...., ..., ...., as it stopped the data load)

Anil_Babu_Samineni

My intention is here, Check in script from 87th line and replace it as below and reload then we can look? Becaue, If you notice "My New Sheet" then is one text box which is working using variable

    Time (end_time, 'hh:mm') as job_instance_end_time_b;

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