4 Replies Latest reply: Nov 10, 2015 10:03 AM by Joanna Seldon RSS

    percentage brackets

    Joanna Seldon

      Hiya

       

      I have a calculation / expression that calculates parcels delivery time expectancy.

       

      this shows if it was 100 % on time, or percentage over or under time

       

      in the table i have already a column that works out as a number how many days its taken between order date and delivery date, hence getting the percentage is easy. 

       

       

      However...

       

      i need to do this calculation in the data load, so i can divide customers into percentage groups. this is so in the app i could 

      use a pivot table

       

      to show e.g

       

      e.g 5 customers , from catering department, delivery time...was in the 100 % section

       

      e.g 2 customers , from catering department, delivery time...was in the 0- 25 % section

       

      i need help on this

       

      please help


        • Re: percentage brackets
          Jonathan Dienst

          If you want useful help for this, I suggest that you post a representative sample qvw file, along with representative sample source data (in inline loads, spreadsheets, csv files or qvd files).

           

          You are looking at an interval match, class() function or nested if to classify the detail.

            • Re: percentage brackets
              Joanna Seldon

              Hiya

               

              cant really... any other advise

               

              Table shows

               

              OrderDate,       Deliverydate,    EstDeliveryDate     DateDaysFordelivery       DaysTakenDelivery

               

              01/11/2014        09/11/2014        30/11/2014                         30                                 20

               

              kpi  / expression in app already works out percentage of days take between in app  between  DaysFordelivery and DaysTakenDelivery

               

              please help

            • Re: percentage brackets
              Andrew Mein

              IF(<Percentage> >= 0 AND <Percentage> < 10, '10 Percent Group',

              IF(<Percentage> >= 10 AND <Percentage> < 20, '20 Percent Group',

              ...................

              IF(<Percentage> >=90 and <Percentage> < 100, '90 Percent Group', '100 Percent Group')

              ))))))

               

              check you have the right number of closing brackets (i haven't checked!)

                • Re: percentage brackets
                  Joanna Seldon

                  Hiya

                   

                  thanks , but using your help done it a slightly different way

                   

                  if((DaysTakenDelivery /  DateDaysFordelivery  ) >= '1', 1,0) as MoreHundredPercent,

                   

                  ect... different 'if' for each percentage bracket

                   

                  then counted each percentage group in expression for the chart

                   

                  Kind Regards