How to create the performance analytics for start and end date time field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 08:19 AM
Hi Team,
I have a requirement to create performance analytics dashbord
case 1: I want to calculate percentage utilization of Workplace reservation based on Start and end field. Like I need to calculate total time utilization for ex: Reservation 1->1 hr, Reservation 1->2 hr, Reservation 1->3 hr for day working hrs = 8hrs so %utilization like hrs in use/total potential hrs
Case 2: In which region of a floor have higher utilization use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 10:38 PM
Hi @Akshaya14 ,
Where do you have issues in creating the above two use cases? which issues are you facing?
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 11:19 PM
Hi @Akshaya14
Let's try below approach.
- Define an Indicator Source in the Workplace Reservations table with your own conditions. (Make sure you include the date corresponding with the frequency)
- Create an Automated Indicator (ex: Daily)
- Select Aggregate as SUM
- Scripted is True
- Create new PA Script. Sample below
var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
var hours=function(x,y){return diff(x,y)/(60*60*1000);}; //Convert to hours
hours(current.start, current.end); //Your start and end date fields
Then execute the Collection Job to collect data for the Indicator.
Now, you have an Indicator of "Total Hours of Reservation (Daily)". So if you'd like to have the percentage of utilization, go ahead and create one more Formula Indicator. Sample Formula below:
([[Total Hours of Reservation (Daily)]] / 😎 * 100
Let me know if it works for you
Cheers,
Tai Vu