Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3555
How to perform this calculation, please help
posted

Hi,

I have a grid with the following columns and need formula and calcution, but I don't really know how to work it out with WinCalcManager.

Here is the scenario

My grid have 5 columns, Drug Name, Country, Brand, Unit Sale and Calculation

The Calculation column is base on all the other 4 columns.  If the Brand cell is empty, the cell for Calculation column will be empty.

If not, Calculation cell will be calculation as follow:

Unit Sale cell / Sum of all rows of Unit Sale cells that have the same Drug Name, Country, Brand

for example:

 Drug Name     Country     Brand     UnitSale      Calculation

 Drug1            US           brand        10               10 / (10 + 20)

 Drug1            US           brand         20              20 / (10 + 20)

 Drug1            US                            10             

 Drug1            Japan       brand         10             10 / (10)

 Drug2            US           Generic      10             10 / (10 + 15)

 Drug2            US           Genric         15            15 /( 15)

 Drug2            Japan       Generic       30             30 / (30)

 Drug2            Japan                          50 

Parents
No Data
Reply
  • 469350
    Offline posted

    There's no way for the CalcEngine to sum up only certain rows with certain values - unless you use OutlookGroupBy functionality in the grid and group by the Brand field and then add a summary. You could then use that summary in your calculations. You could use the 'IF' function to handle when the Brand is blank. 

Children
No Data