3 Replies Latest reply: Oct 25, 2016 2:01 PM by Saran De RSS

    how to calculate values of by a range

    Naveen N

      Hi techi

      i have two table

       

      Table1:

       

      Product

      Quantity Sold

      A

      5

      A

      10

      A

      5

      B

      5

      B

      10

      B

      5

       

      Table 2:

       

       

      Product

      Start

      End

      Price

      A

      1

      3

      100

      A

      4

      15

      110

      A

      16

      30

      120

      B

      1

      3

      160

      B

      4

      15

      200

      B

      16

      30

      210

       

      and my output should be like this

       

       

        

      Product

      Quantity Sold

      Price

      A

      5

      520

      A

      10

      1100

      A

      5

      600

       

      This is how i am calculating first 5 quantity sold the total price is 520rs

      (3*100)+(2*110) = 520