Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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
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 "
)
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
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |