Story points per issue type per project in the last 5 fix versions

Greetings,
I’m building an analytic report to count how many story points were done in a particular status for a project in the last 5 released fix versions.
This is my table:

The “last 5 versions” calculated member is:

aggregate(tail(
  order(Filter([Fix Version].[Version].Members,
  [Fix Version].CurrentMember.Parent.Name='Released'),
  [Fix Version].CurrentMember.Get('Release date'), BASC),5))

I get only 4 versions, in spite of more of them being in the release summary of Jira project’s page.
Is there anything wrong with my calculated dimension?

I partially get it, if I filter “last 5 versions” and then cut by project I get the last 5 versions - in general - and then pick the only ones from the project I choose, so I have only the ones in the last 5 that belong to the project I’m seeing.
Duh.

Hi Mauro,

You are quite right: the calculation formula retrieves last 5 versions from all versions in the Fix version dimension. You may create “Last 5 versions” members for each project released versions where you filter not all versions, but only versions of one particular project, and then retrieve last five of them; if you have only a few projects, it could be a solution. In the calculation formula, instead of filtered [Fix Version].[Version].Members use [Fix Version].[PROJECT_NAME].[Released].Children ordered by the release date.

More general solution would be to include this filter condition (i.e. for last five versions) in calculated measure (in Measures), then you would always retrieve only versions that are related within the reports context:

Sum(
 Tail(
  order(
   Filter([Fix Version].[Version].Members,
    [Fix Version].CurrentMember.Parent.Name='Released' AND
    [Measures].[Story points history]>0),
  [Fix Version].CurrentMember.Get('Release date'), BASC),3),
 [Measures].[Story points history]
)

Then you would select Fix version all Version level members in rows, needed Page filters and this measure in the report columns, and set row filter >0 on the measure.The last five release versions with story points in the report context would be filtered in the report rows.

Best,
Ilze, support@eazybi.com