4 Replies Latest reply: Feb 12, 2015 11:35 AM by Emma Self RSS

    Grid Chart and Alternate States



      I am trying to use a grid chart to compare the result of two different states.


      In my data there are three different tests, and a bunch of companies.  I want to compare the results from My Company against a variety of selections of other companies.  Bar charts are good (totally understand this so please don't send me messages about just using bar charts and how to deal with end users) but I'm interested in this as a query about whether it might be possible using a grid chart.  I'd hoped I'd be able to put one dimension in (TestType) and two expressions in the same way you do with bar charts.


      Obviously this hasn't worked so I thought I'd ask whether it is possible to essentially have the different states as a dimension on the grid chart or whether I'm looking for something that is simply not possible.


      I've attached a basic example with data ... any ideas about this would be greatly received!


      Many thanks,


        • Re: Grid Chart and Alternate States
          Aaron Morgan

          Hi Emma,


          A grid chart needs two dimensions to function, and an expression to plot the points over. I don't think you need an alternate state to compare here, unless you wanted it to be separate to all your other charts in selection?


          If you create a grid chart with Company and TestType as your dimensions, then simply add Avg(Result) as your expression, you should see a comparison for all companies over all tests in one place. Using a company listbox, if you select 'MyCompany' and then select all the others you want to compare against, you can limit it.


          Alternatively, if you change your expression to read:



          This will always show your company plus any other companies you select, which may be better for what you're suggesting.


          Hope this helps - if I'm way off the mark let me know!

            • Re: Grid Chart and Alternate States
              Oleg Troyansky

              Hi Emma,


              please see attached. A little explanation - the Grid chart requires two dimensions and a single expression, while you have  a single dimension and two expressions. The trick is to convert two expressions into a second dimension. You can do it using the ValueList() function. Then, in the single expression, you can test the current value of the ValueList() and provide the corresponding calculation.


              I'm explaining this and many similar solutions in my new book QlikView Your Business that's coming out in April. Check it out on Amazon!




              Oleg Troyansky

              www.masterssummit.com - take your QlikView skills to the next level!

              • Re: Grid Chart and Alternate States

                Hi Aaron,


                The problem is I don't want to see the details of all the other companies - I want to compare the result of my company with an average of other companies I've selected (not including my company).


                Essentially I want the central bar chart that is in the attached example to be in a grid ... but I can't figure out if it's possible!


                You have inspired me to test something else though.  If I have a mapping table that groups all other companies as one group and then my company in a different group and use these as the dimension in place of company this then works!  Now just to check if this works with the rest of the application!


                Many thanks - very helpful!