3 Replies Latest reply: Mar 21, 2014 3:25 PM by Jeremiah Kurpat RSS

    Line Chart

    Sushma RM


      Hi,

       

      Please find the attached qvw file

      I need to create a line chart

      one line for Dell should be for default

      and I need 3 more line of Top 3  Vendors

       

      I tried using rank,aggr and sum but still I am not able to create it

       

       

      Thank you.

        • Re: Line Chart
          Jeremiah Kurpat

          See if attached is what you are looking for. Used dimensions of Quarter and Vendor with the expression:

           

          sum({<Vendor = {'Dell', '=match(aggr(rank(sum(Share)), Vendor), 1, 2, 3)'}>}Share)

           

          Hope this helps!

            • Re: Line Chart
              Sushma RM

              Thanks for the help

               

              But if we make selections in country level the graph has to display default +top 3 for that country

                • Re: Line Chart
                  Jeremiah Kurpat

                  This should work for selections of country. Did you mean you want it to display the Top 3 no matter what country is selected?

                   

                  Try this:

                   

                  sum({1<Vendor = {'Dell', '$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor)))',

                  '$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor), 2))',

                  '$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor), 3))'}>}Share)

                   

                  Hope this helps!