2 Replies Latest reply: Jul 8, 2010 3:27 AM by ra117hama RSS

    Building aggregation depending on the sub-total of a (not-)included dimension

      <body><p>Following table is given:</p> <p> </p> <p>Customer | Article | </span>Sales</p> <p>----------------------------------------------------</p> <p>C1 | A1 | 4</p> <p>C1 | </span>A1 | </span>7</p> <p>C1 | </span>A1 | </span>-10</p> <p>C1 | </span>A2 | </span>2</p> <p>C1 | </span>A2 | </span>5</p> <p>C1 | </span>A2 | </span>3</p> <p>C1 | </span>A3 | </span>-4</p> <p>C1 | </span>A3 | </span>6</p> <p>C1 | </span>A3 | </span>-5</p> <p>C2 | </span>A1 | </span>-1</p> <p>C2 | </span>A1 | </span>3</p> <p>C2 | </span>A1 | </span>-4</p> <p>C2 | </span>A2 | </span>7</p> <p>C2 | </span>A2 | </span>-9</p> <p>C2 | </span>A2 | </span>5</p> <p>C2 | </span>A3 | </span>1</p> <p>C2 | </span>A3 | </span>0</p> <p>C2 | </span>A3 | </span>-3</p> <p> <tbody> </tbody> </p> <p> </p> <p>Desired table have to show the sales per customer but only regarding article which have negative total of sales for the customer</p> <p> </p> <p>Customer | </span>Sales  | </span>Comment</p> <p>-----------------------------------------------------------------------------</p> <p>C1 | </span>-3 | </span>only article A3: -4 + 6 + (-5)</p> <p>C2 | </span>-4 | </span>only article A1 and A3: -1 + 3 + (-4) + 1 + 0 + (-3)</p> <p> </p> <p>How can I code it into a formula?</p> <p> </p></body>