Forum Discussion

Fh1's avatar
Fh1
New Contributor
2 years ago

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

 

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.

 

 

 

  • 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