3 Replies Latest reply: Mar 27, 2018 7:22 PM by David Forest RSS

    straight table

    Elangovan Ponnudurai

      Hi,

       

      I have a straight table chart with one dimension(desc) and 2 expression(amount and received). I am getting result like below..

       

      descamountreceived
      type 11000700
      type 220001300
      type 31500580

       

      I have one requirement to show % value down to the type 2 desc. Sample output is like below. how to do it? any suggestion?

       

       

      descamountreceived
      type 12500700
      type 220001300
      type 2 ratio against 1(2000/2500) 0.8*100=80%(1300/700) 1.86*100=186%
      type 31500580
        • Re: straight table
          Akshaya Aditya

          Hi Elangovan,

           

          In these scenarios, you have to use synthetic dimensions. You have to use Valuelist function to create synthetic dimension to have such format.

          two questions

          Is it only three types avaiable or there are more?

          Is it just after Type 2 you need ratio or after every type you need ratio from above?

           

          Regards,

          Akshaya

            • Re: straight table
              Elangovan Ponnudurai

              Hi Aditya,

               

              Is it only three types avaiable or there are more?

                        There are more types(11).


              Is it just after Type 2 you need ratio or after every type you need ratio from above?

                        No, I need after some specific types.. example type 2,4,5,8,9


              • Re: straight table
                David Forest

                This could be done in load script using peek() and creating new fields for amount_%_prev, received_%_prev

                something like:

                If (type=2 or type=4 or type=5 or type=8 or type=9, (peek(amount,-1)-amount) *100) as amount_%_prev

                 

                there would need to be an order by customer (or some key)/date/type so that the previous record is the prior type.