16 Replies Latest reply: Mar 8, 2016 7:29 AM by V SUDHAKAR RSS

    how to write dynamic expression for weighted avg

    naveen kumar

      HI

      sample data:

      place        ship     quantity       tm

      loadport  ship1      1000           9.2

      loadport  ship1      1200           9.8

      loadport  ship1      1030           7.2

      loadport  ship2    2000              1.5

      loadport  ship2     1100           1.9

      loadport  ship2    3000        9.2



      required out put in straight table:

                   place       ship           quantity                                tm

                                                    sum(quantity)                      ?(how to write this dynamic expression)

                   loadport    ship1            3230                                1000*9.2+1200*9.8+1030*7.2/1000+12000+1030

                  loadport       ship2            6100                               2000*1.5+1100*1.9+3000*9.2/2000+1100+3000

       

       

      thanks