# Adding a calculated column on cumulative columns

I have a table with two columns, A and B. I added a column to compute cumulative value of column A. Similarly added a column to the report to compute cumulative value of column B. I need to add an additional column to the report to track “Cumulative value of column A / Cumulative value of column B”. Could you please advise how to achieve this in eazyBI? Thank you!

Hi @aagarwal ,

I suppose you added standard calculations to get a cumulative amount in the report (documentation here: Add standard calculations based on a selected measure).

You can create new calculated measures to combine already existing measures, such as dividing one measure with another.

1. In Measures, define a new calculated measure (documentation here: Calculated measures).

2. write expressions using the full measure names for accumulated values in the formula editor.
For example, if the initial name for column A is “Column A,” then the full name of the cumulative measure should be [Measures].[Cumulative Measure A].
The expression for ratio calcaution might look like this:

``````[Measures].[Cumulative Measure A]
/
[Measures].[Cumulative Measure B]
``````
3. Set measure formatting to decimal (documentation here: Formatting)

Suppose you do not want to see individual columns “Cumulative Column A” and “Cumulative Column B” in the report, only the ratio. In that case, you can update the calculation for ratio and use expressions behind those cumulative metrics instead of names.

Check the formula for cumulative calcaution. Click on Cumulative Column A header → Edit calculated → copy the expression. Use copied expression instead of the full measure name.
The updated expression for ratio calcaution might look like this:

``````CumulativeSum([Measures].[Column A])
/
CumulativeSum([Measures].[Column B])
``````

Best,
Zane / support@eazyBI.com