[JIRA 6 / EAZYBI] "rounding" values

Hi all,

I want to count time spent by users with the following formula:

If (for each day) user logged more than 7 hours then count "1 day" 
else (for each day) user logged more than 3 hours bu less than 7 hours then count "0.5 day"
else count "0"

The idea is to truncate hours into days spent for accounting purposes. I don't want to have real "project" values (aka real time spent on tasks), just a truncated to days values. Thank you for your help.

Jerome 

1 answer

1 accepted

Hi Jerome

You can create define a calculated measure with a name "Rounded days" and with a formula

Sum(
  Descendants([Logged by].CurrentMember, [Logged by].[User]) *
  Descendants([Time].CurrentHierarchyMember,
    [Time].CurrentHierarchy.Levels('Day')),
  CASE
  WHEN [Measures].[Hours spent] >= 7 THEN 1
  WHEN [Measures].[Hours spent] >= 3 THEN 0.5
  END  
)

Descendants function will drill from the current Logged by and Time dimension members into detailed set of User level members and Day level members. And when we multiply the sets with * operator then cross join of all possible combinations is created.

Then for each user and day we perform the calculation and calculate the total sum.

Please see a sample test report where this calculation is included https://eazybi.com/accounts/1632/cubes/Issues#report/test%20rounded%20days

Please take into account that if you have very large number of users in Logged by dimension or if you have selected large Time period then this calculation might not be very fast as the number of user and day combinations will be large.

If you need more detailed help then please contact eazyBI support.

Hi Raimonds at first try it works fine! Thanks for this and sorry for my late answer.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,316 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot