1 Reply Latest reply: May 7, 2011 3:40 AM by Deepak Vadithala RSS

    Set analysis - Aggr or anyother option?

      I have 2 Charts(You can visualize the attached image) as follows -

       

      First - Refer the image for Feature chart

      Dimension

      l_calendar_monthend  --- date

      t_calendar_monthend  --- date

       

      Expression-

      count(DISTINCT If(t_transaction_date <= t_calendar_monthend and t_loss_date <= l_calendar_monthend and t_calendar_monthend >= l_calendar_monthend,t_claim_feature))

       

       

      Second - Refer  the atatched image for Loss chart

      t_loss_monthend   --- date
      t_transaction_monthend  --- date

       

      Expression-

      rangesum(Before(total sum(t_Loss_amt),0,120)),t_loss_monthend,t_transaction_monthend

       

      I was trying to get a third chart as follows-

       

      Dimension

      t_loss_monthend   --- date
      t_transaction_monthend  --- date

       

      & combined expression(Basically I want to divide each cell from 2 chart with values from 1st cell chart) -

       

      Aggr(rangesum(Before(total sum(t_Loss_amt),0,120)),t_loss_monthend,t_transaction_monthend)
      /
      Aggr(
      count(DISTINCT If(t_transaction_date <= t_calendar_monthend and t_loss_date <= l_calendar_monthend and t_calendar_monthend >= l_calendar_monthend,t_claim_feature)),
      l_calendar_monthend,
      t_calendar_monthend)

       

      but it does not work. I also tried to use the VB Macro to get the calculations into a vb array but again was unsucessfull while loading to table using

      /*-----------------------------

      set obj = ActiveDocument.GetSheetObject("TB01")

      obj.SetInputFieldCell 1,1,"999"   'set 2nd row value in 2nd column to 999

      ***/////

       

      Can someone pease assist -