# Calculated value in opened issues

Hello,
Since 2 days I try to find the solution of my problem and I’m going mad For each opened issues, I would like to calculate RESULT = [Measures].[value1] - [Measures].[value2] - [Measures].[value3] and if the result is <0 then the result of the issue =0.

Ex:
|Value1|Value2|Value2|Result the issue|
| --10-- |-----15-- |-----0—|0|
|—10-- |----- 5-----|-----0—|5 |
|—10-- |------0-----|-----5—| 5 |
|—10—|------0-----|----12–| 0 |
------------------------------------- 10 |<-- Value I would like to calculate (sum of results : 5+5)

Please help me !

Have a good day
Alex.

Hi @Alex76

Welcome to eazyBI community!

In this case, you would need the separate approach for total calculations.

Try this code when creating a calculated measure (with integer format).

``````NonZero(
SUM(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
[Measures].[Value1]>0
AND
[Measures].[Issues created]>0
),
CASE
WHEN ([Measures].[Value1] - [Measures].[Value2] - [Measures].[Value3]) < 0
THEN 0
ELSE [Measures].[Value1] - [Measures].[Value2] - [Measures].[Value3]
END
)
)
``````

Here I am expecting that “Value1”, “Value2”, “Value3” all are numeric Jira custom fields imported as properties and measures in eazyBI cube

Martins / eazyBI support

Hello Martins,

You helped me to find the solution 