3 Replies Latest reply: Mar 20, 2014 4:37 PM by Manish Kachhia RSS

    Top 3 sales in Line chart

    Sushma RM
      QuarterCustomerSales
      q1HP100
      q2Apple300
      q3Cisco250
      q4dell170
      .sony299
      ....

       

       

      please find the sample data 

      There are almost 40 rows in my table

       

      My dimensions will be quarter

      I wanted to create a line chart where in line for one customer based on sales should be default and I need 3 top Customers lines to be displayed

       

      please help me in creating Expressions for top 3 Customers

       

      Thanks.

       

       

        • Re: Top 3 sales in Line chart
          sree anaarasi

          Hi I think u need to create an expression in such a way that nothing is selected  change ur expression to select 3 with rank funciton.

          for example if u have  Year, Quarter, Month  Date.

          Expression 1: select the top 3 values when year, quarter , date and month writing IF conditions. with rank<=3 expression

          Second. if they select anything from calendar try to  display all the values with regualt expression.

           

          If still u need some help post with a  sample QVW file with what  selections u want to display top 3  by default .

           

          Thanks

          • Re: Top 3 sales in Line chart

            use calculated dimension like

             

            =if(aggr(Rank(Sum(Sales))<=3,Country),Country)

            • Re: Top 3 sales in Line chart
              Manish Kachhia

              If you want to show TOP 3   Customers for each Quarter... use below

               

              Dimension

               

              IF(Aggr(Rank(SUM(Sales),4),Customer, Quarter)<=3, Quarter)

              IF(Aggr(Rank(SUM(Sales),4),Customer, Quarter)<=3, Customer)

              Select Suppress When Value is NULL

               

              Expression

              SUM(Sales)