Forum Discussion

SaiKumarReddy's avatar
SaiKumarReddy
New Contributor II
2 years ago

Cell Wise Calculation

I have 50 rows and 4 columns, here I have to do a calculation with cell wise.
For eg: col4row20 = col1row1 / col1row10
             col4row21 = col1row2/col1row11
             col4row22 = col1row3/col1row12
Likewise I need to input the multiple formulas for the cells, here what type of member formula I can use.

  • JackLacava's avatar
    JackLacava
    2 years ago

    I think we might be picking the wrong approach here.

    CubeViews support Conditional Format statements, but that does not perform calculations (well, it can flip signs, but that's it). It also supports CubeView Extenders, i.e. custom code that can run on every intersection, but only when the CV is exported as report (because, again, it's meant mostly for formatting; but people abuse it for various things).

    For calculations, you're supposed to use expansions and overrides, which are pretty powerful and cover most average needs. If those are not enough, the calculations are clearly not simple reporting operations, but full-on calculations on complex data; so the best approach becomes working with Dynamic Calc member formulas, typically on UD8 members. Those will allow you more flexibility to pull data from anywhere.

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Look in the Samples section of your Member Filter Builder - there is a section on "Column/Row Expressions" containing samples to do that sort of work - using GetDataCell and the CVC/CVR/CVRC functions. They are also documented in the help.

    • SaiKumarReddy's avatar
      SaiKumarReddy
      New Contributor II

      Yes I saw them, but when I entered the formula in one particular cell, the same formula is applying for all of the cells in that particular column.
      for eg: in the col4 first cell I have entered formula to do the division for col1row1 / col1row10
                  then I have entered the formula for col1row1 / col1row10 in the second cell,
                  but the 1st cell formula is getting replaced with the second formula.

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        That sounds like you need to use Row Overrides (on columns) and/or Column Overrides (on rows).