Calculations in WP_reporter

  • Hello

    stock name __|__account____|____share value_____|______share #_____|______Total value

    stock name __|__account____|____share value_____|______share #_____|______Total value
    ____a________|____1_______|________#__________|________#________|_________#
    ____b________|____1_______|________#__________|________#________|_________#
    ____c________|____1_______|________#__________|________#________|_________#


    With the four columns above, a calculation of the total value of stocks a) b) and c) can be made with
    par.ASetStringProp(WPAT_PAR_COMMAND, 'left(2)*left(1)');


    Question:
    If there are multiple accounts holding a single stock type as in below.

    stock name __|__account____|____share value_____|______share #_____|______Total value
    ____a________|____1_______|________#__________|________#________|_________#
    ____a________|____2_______|___________________|________#________|_________#
    ____a________|____3_______|___________________|________#________|_________#
    ____b________|____1_______|________#__________|________#________|_________#
    ____c________|____1_______|________#__________|________#________|_________#


    Is there a mechanism so that the share value could be calculated for shares of stock a) with the share value being entered for only the first account (see above). For example account 2 would be par.ASetStringProp(WPAT_PAR_COMMAND, 'left(2)up(1)*left(1)');

    TIA
    John

    • Offizieller Beitrag

    There is no up() since this would not be exact. It is not always clear that one cell is near to the other vertically.

    However any cell can be given a name - and this name can be used in a calculation. If multiple cells have the same name, the value for that "name" is the sum of all values.