3 Replies Latest reply: Feb 5, 2012 1:33 PM by Stefan Wühl RSS

    Ranking expression

      hi all..

      i'm quite confused about how to create a rank in expression. I need an expression that can get sort out the salesman rank. Each rank in each chart, so i want to have a 3 different chart that each chart can show its rank.

      Who are in the rank 1, who in the rank 2 and so on..

      please see attached qvw..

       

      need it urgent..thank you

        • Re: Ranking expression
          Stefan Wühl

          I assume you want to get the rank based on the amount or sum(amount) not based on id_salesrep, like in your sample, right?

           

          I attached a sample for QV11 using alternate states (the state called Test) to get the charts insensitive to selections in id_salesrep.

           

          Hope this helps,

          Stefan

            • Re: Ranking expression

              great.. but still having a weird result, if i select only 1 value in id_city then in the ranking 2 and 3 showing more than 1 id_city.

              $::id_city << i never saw any expression like this, where can i learn about this?

               

              Thanks a lot..

                • Re: Ranking expression
                  Stefan Wühl

                  I see. You need to add the same set expression to your expressions in those charts:

                   

                  =sum({<id_city= $::id_city >} amount)

                   

                  If you are not familiar with set analysis, please have a look at the Manual. There should also be a short explanation of the alternate state concept.

                  The :: is a scope operator, which unfortunately is not well explained in the Manual (neither is the actual use of alternate states within set anaylsis.

                  In short, the above set expression is telling QV to apply a field selection to field id_city (remember that the chart is in 'Test' alternate state) that is copied fom the selected selection state of field id_city in default state. Since we have the default state list boxes for this field to select in on the sheet, I just want to use that selection also in my alternate state.

                   

                  Hope this helps,

                  Stefan