How to calculate values of the same column in the Calculated Field

Fh1
New Contributor

 

Good morning,

I am writing to inquire about the correct formula for calculating the difference between two values in the same column in a Calculated Field of a Report Design.

For example, if I wanted to calculate the difference between the values 121.46 and 120.30 in the "Col0Value" column, what would be the exact formula to use in the Calculated Field?

The data are read from a cube view data adapter (not MD). The image below shows an example of the data from the data adapter.

Thank you.

Fh1_2-1702459420590.png

 

 

 

2 REPLIES 2

Sai_Maganti
Contributor II

You might want to try this:

Create 3 calculated Items

Item1
iif(Col1Hdr0NameAndDesc = 'Some Val', SUM(Col0Value), 0)

Item2
iif(Col1Hdr0NameAndDesc = 'Some Other Val', SUM(Col0Value), 0)

Item3 = Item1 - Item2

Thank you @Sai_Maganti