Number of the day within a sprint

Hello,

In my Burndown chart, I Try to calculate the ideal Tasks remaining. To be able to do so I have to calculate the number of the day in the chart. Thx to the new function (DateDiffWorkdays), I avoid the weekend days issue, but I encounter an issue when I try to calculate the difference between the sprint start date and the day start day.

Here is the code I use

DateDiffWorkdays([Sprint].CurrentMember.get('Start date'), 
[Time].CurrentMember.StartDate)

As the sprint start manually, its start time can change between sprints.
With this calcul, here is an exmple of results :

First day: -0.36 instead 0
Second day : 0.64 instead 1
Third day : 1.64 instead 2
...

Is someone know how to get around this problem ?

Thx in advance.

1 answer

1 accepted

Sprint start and end dates are recorded as date with time and [Sprint].CurrentMember.get('Start date') is returning date with time information and therefore DateDiffWorkdays returns non-integer date values.

You can use MDX expression

DateValue(DateParse([Sprint].CurrentMember.get('Start date')))

to get Sprint start date without time (beginning of the day at 00:00:00). See also updated example page which mentions this https://docs.eazybi.com/display/EAZYBIJIRA/Issue+resolution+days+reporting

Thx Raimonds,

For information, here my code to calculate ideal tasks remaining :

Nb Days in Sprint :

DateDiffWorkdays([Measures].[Sprint start date],
[Measures].[Sprint end date])
N° Day Sprint :

DateDiffWorkdays( 
DateValue(DateParse([Sprint].CurrentMember.get('Start date'))),
[Time].CurrentMember.StartDate)
Sprint ideal Task remaining:
(Sum(
    { [Time].CurrentHierarchyMember.Parent.Level.Members.Item(0):
      [Time].CurrentHierarchyMember.Parent.PrevMember },
    [Measures].[Story Points created]
  ) +
  Sum(
    PeriodsToDate([Time].CurrentHierarchyMember.Parent.Level),
    [Measures].[Story Points created]
  ))
  -
((Sum(
    { [Time].CurrentHierarchyMember.Parent.Level.Members.Item(0):
      [Time].CurrentHierarchyMember.Parent.PrevMember },
    [Measures].[Story Points created]
  ) +
  Sum(
    PeriodsToDate([Time].CurrentHierarchyMember.Parent.Level),
    [Measures].[Story Points created]
  )) / [Measures].[Nb Days Sprint]) * [Measures].[N° Day Sprint ]

I don't know if it is the optimal code but it works :

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Apr 10, 2018 in Marketplace Apps

Learn about how Stefan K. built one of the *first ever* Marketplace apps

In this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...

12,329 views 11 24
Read article

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