7 Replies Latest reply: Jul 11, 2011 5:57 PM by carhbttqlik RSS

    Chart showing different selected data

      Hello.

       

      I have a multibox with 3 fields, Service, Year and Quarter and I want a chart that shows me the net profit but for all years and quartes not only the ones selected, I already have a solution but didn´t like it much, I created a group in the chart which includes year and quarter and included as a Dimension so when a service, year and quarter is selected in the multibox the chart shows the net profit (which is in expressions) for that year-quarter and if I click the group arrow the bart then includes all others years and quarters because now the selection in the multibox is only Service but I don´t want the values of year and quarter to be deselected in the multibox because there are other charts and objects showing data.

       

      I´m sure there should be another way to graph data independently of what´s selected in the multibox.

       

      Best Regards,

        • Chart showing different selected data
          John Witherspoon

          Look for "set analysis" in the help text or reference manual.  It lets an expression define its own set of data partially or completely independent of what's been selected.

          • Chart showing different selected data
            Kaushik Solanki

            Hi,

             

               Is that group cyclic, if not then edit group and make it a cyclic group.

             

               If do not get the ans, do upload the qvw file.

             

            Regards,

            Kaushik Solanki

            • Re: Chart showing different selected data
              Nagaian Krishnamoorthy

              One way of completely ignoring selections in the bar chart is in the attached example.

               

              As suggested by John, you may play with the set expressions to achieve what you want.

               

              Hope this helps as a starting point.

                • Chart showing different selected data

                  Thanks all.

                   

                  krishnamoorthy, your example is a little bit different because Q and Y fields are not included in your graph, in mine I have 3 fields in multibox let´s say client, year, quarter, I have selected one value for each of them

                   

                  client = acme

                  year = 2011

                  quarter = 1

                   

                  now I want to graph the net utility for acme but for all years and all quarters not especifically for year 2011 quarter 1

                   

                  My question here is how do I tell the graph that I don´t want year and quarter selected in multibox to be used when building the graph?

                   

                  My current expression is:

                   

                  Aggr( sum([net profit]),Client)

                   

                  but this is only graphing acme,2011,1

                   

                  John, I´ve read the reference manual but can´t find something useful in set analysis, Could you point me in the right direction to search for?

                    • Chart showing different selected data
                      Erich Shiino

                      If client is a dimension in your chart, you probably don't need the aggr(  ... , client) - The chart will create the Aggr() for you.

                       

                      As John mentioned, you can use set analysis.

                      In your case, it will look like this:

                       

                       

                      ( sum( {< year = , quarter = > } [net profit])

                      The 'year = ' means that you want to ignore selection in the field year

                      If you want to force a selection it would be:

                      ( sum( {< year = {2011} , quarter = {1}> } [net profit])

                      If you want to ignore all user selections:

                      ( sum( {1< year = , quarter = > } [net profit])

                       

                      Hope this helps,

                       

                      Erich

                      • Re: Chart showing different selected data
                        John Witherspoon

                        carhbttqlik wrote:

                         

                        John, I´ve read the reference manual but can´t find something useful in set analysis, Could you point me in the right direction to search for?


                        Are you on an earlier version of QlikView?  I think set analysis was introduced in 8.5, so it wouldn't be in the manual for earlier versions.  If you're on 8.5 or above, searching for 'Set Analysis' should work fine.  In my version 9 reference manual, it's on page 365, which is page 1252 in the PDF.  It might be easier to find it in the help text, though, as the index will take you right to it, and you won't have to wait for a giant PDF to load.