How can i break the cases to something more dynamic?

Hello,

Here are my original data.
The measure [id numerique epic] prints the Epic ID.
The measure [PV] prints the issue prices.

id numerique epic PV
1 3000
1
1
2 1000
2

I would like to get these two new measures: [number of issues by epic] and [spread].

id numerique epic PV number of issues by epic spread
1 3000 3 3000
1 3 3000
1 3 3000
2 1000 2 1000
2 2 1000

Here is my code for the measure [number of issues by epic]:

CASE

WHEN [Measures].[id numerique epic]=1
THEN
count(filter(
[Issue].AllMembers,
[Measures].[id numerique epic]=1 )

WHEN [Measures].[id numerique epic]=2
THEN
count(filter(
[Issue].AllMembers,
[Measures].[id numerique epic]=2 )

WHEN [Measures].[id numerique epic]=3 THEN…

It is working. However I have hundreds of epics and creating all the cases is very exhausting. So I wish to get somekind of dynamic code like :

CASE
WHEN [Measures].[id numerique epic]= i
THEN
count(filter(
[Issue].AllMembers,
[Measures].[id numerique epic]=i ) with i an integer.

The problem with the measure [spread] seems similar.
Thank you very much for you answer. Have a nice day!

Coelho

Hi,

If you have imported “Epic Link” custom field you could try using the epic hierarchy Issue.Epic hierarchy and select the epic level from the “Issue” dimension.
That should roll up results from the children.
Then you could still use the pre-defined measure “issues created” and it would count issues in each epic automatically.

Also if PV is a numerical field in Jira, make sure you imported it as measures in eazyBI.
Then select a measure “PV created” for your epic hierarchy members.

Martins / eazyBI support