5 Replies Latest reply: May 6, 2017 7:18 AM by Vineeth Pujari RSS

    How to find the nth value from the table?

    Mohan Kumar

      Hi,

       

      I having a problem while I wanted to find the nth value from the table. I can get it when I use the dimension as it is in the load table, but when I use the dimension with the certain condition I needed, it doesn't work.

       

      My dimension with the condition is,

      if(aggr(Count(distinct BILLDATE),CUSTOMER)>1 and Aggr((Sum(NETAMT) - Sum(QTY*COSTRATE) >1000), CUSTOMER), CUSTOMER) I stored the above expression in the variable vCustomer

       

      I tried to find the nth value by using the following expression,

      aggr(if(aggr(rank(Avg(NETAMT)),($(vCustomer)))=5,Avg(NETAMT)),($(vCustomer))) in this case i wanted to find 5th row value from the table, but couldn't find.

       

      Any help is greatly appreciated.

       

      Thanks,

      Mohan