Forum Discussion
Show Stats between hours completed
Hello
I currently have some data that each row contains a specific taskID number, there is a task Start and and Task complete column, and finally there is a tasklength column that shows how long the task took to run from start to end in Seconds, Hours Minutes and Days.
Essentially what i wish to do is find out how many tasks were completed less than 24 hours, between 24 and 48 hours and more than 48 hours by means of a bar graph
I cannot get my head around using a measure for greater than or less than etc
Any advice would be welcome
- Anonymous6 years ago
Hi Barrie2020,
You can create 3 measures for calculating the count of this different task length type:
tasklength<24 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]<24) 24<=tasklength<=48 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]>=24&&'Task'[TurnaroundTime(Hrs)]<=48) tasklength<24 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]<24)Best Regards
Rena
3 Replies
- amitchandakSuper User
you can create a column like
Duration in hr =datediff([ task Start] ,[Task complete ],HOUR)
On top of that build bucket using the switch
switch( true(),
[Duration in hr] <=24 , " < 24 ",
[Duration in hr] >=24 && [Duration in hr] <=48 ," 24 to 48 "
" > 48 "
)
- Barrie2020Frequent Visitor
Hi
Many thanks for your quick response
If it helps i already have a column that shows the time in hours, ee preview below
How can i create a bucket from this, i have not done switch buckets before, apologies
- AnonymousNot applicable
Hi Barrie2020,
You can create 3 measures for calculating the count of this different task length type:
tasklength<24 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]<24) 24<=tasklength<=48 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]>=24&&'Task'[TurnaroundTime(Hrs)]<=48) tasklength<24 = CALCULATE(count('Task'[Task ID]),'Task'[TurnaroundTime(Hrs)]<24)Best Regards
Rena