# Calculated Member Using WHEN/THEN

[04/15] Hi, I need some help about calculated member formula. As you can see the table below, I want to make a column “Fiscal Saving - with Maturity”. This column is a multiplication between the column “Fiscal Cost Reduction with Due Date” and a value, this value depends of the maturity level (L1,L2,L3,L4 and L5). I tried to define the calculated formula, but it’s not working.
I don’t know if it’s a syntax error or the Maturity Level is not being recognized or other thing.

[04/16] When I remove the field “Time” and I put the field “Issue” on the Rows it works. But I need use the field “Time”. The code I used was:

CASE
WHEN [Measures].[Issue Idea Maturity]=“L1”
THEN [Measures].[Fiscal Cost Reduction with due date] * 0.1
WHEN [Measures].[Issue Idea Maturity]=“L2”
THEN [Measures].[Fiscal Cost Reduction with due date] * 0.2
WHEN [Measures].[Issue Idea Maturity]=“L3”
THEN [Measures].[Fiscal Cost Reduction with due date] * 0.5
WHEN [Measures].[Issue Idea Maturity]=“L4”
THEN [Measures].[Fiscal Cost Reduction with due date] * 0.8
WHEN [Measures].[Issue Idea Maturity]=“L5”
THEN [Measures].[Fiscal Cost Reduction with due date] * 1
WHEN [Measures].[Issue Idea Maturity]=“L6”
THEN [Measures].[Fiscal Cost Reduction with due date] * 0
END

Hi @Leonardo_Beltrao ,
Your calculated measure is working only with Issue dimension in the report as the measure is using Issue property (if no issue is in report, then no property will be visible).

First, create a measure that returns a value based on your Idea maturity (I am using my dimension T-shirt size and the measure is called “T-shirt size value”)"

``````CASE [T-shirt size].CurrentMember.Name
-- points for each T-shirt size
When "XS" Then 1
When "S" Then 2
When "M" Then 3
When "L" Then 5
When "XL" Then 8
When "XXL" Then 13
END
``````

Then create a second measure that will calculate the sum:

``````NonZero(
SUM(
Descendants([T-shirt size].CurrentMember, [T-shirt size].[T-shirt size]),
-- count of issues with T-Shirt size
[Measures].[Issues created] * [Measures].[T-shirt size value]
)
)
``````