Forum Discussion

BenMannes's avatar
BenMannes
New Contributor
10 months ago

cube view column calculation

In my cube view, I need a column (% of net sales) to calculate each row/divided by net sales. In the selected column I am trying to only solve for actual. For example actual gross sales/actual net sa...
  • db_pdx's avatar
    10 months ago

    Hi BenMannes: you're on the right track, but just slightly off with your GetDataCell.  You'll want to divide the column Actual, by the intersection of [Net Sales]-Actual.  The below assumes the row [Net Sales] generates only 1 result, and the column Actual generates only 1 result

    GetDataCell(Divide(CVC(Actual), CVRC([Net Sales], 1, Actual, 1))):Name(% of Net Sales)

     That said, if you have multiple reports that need to show % of Net Sales consider putting it into a DynamicCalc helper, that way you just append the helper to your member filter (:U8#PercentOfNetSales, for example) and you can avoid the complex GetDataCell math.

    Cheers,    -db