6 Replies Latest reply: Oct 21, 2015 9:15 AM by Daniel Nasseh RSS

    Aggregation of diagram data by clicking a button?

    Daniel Nasseh



      so i created a diagram with 3 dimensions.

      I am currently happy with the results. Short explanation about the contents you see in the screenshot:


      It is a bar diagram about all people visiting a place througout given years with gender F/M. (you can ignore the third dimension)


      Now what i would like to have for this diagram. I would like to add 2 buttons (they basically do the same):


      If i press the "aggregate gender" button. The split columns of (F/M) should sum up and only show the total amount per year.


      The second button would be similar - would be an "aggregate year" button. If i press this button, all the years would fall together, so that i would only have 2 columns - F/M - with the total amount of visits for all years.


      Is this possible? If so, how?


      Would appreciate any help.

        • Re: Aggregation of diagram data by clicking a button?
          Ruben Marin

          Hi Daniel, one option is to use a variable for each button and conditional dimensions.


          In example the button to aggregate F/M can change vSplitGender between 1 and 0 and you can use this variable in conditional dimension:


          When the variable is 0, the dimension should disappear.


          Before applying you can set the conditional to 0, this way you can check if the expected results will work for you.

            • Re: Aggregation of diagram data by clicking a button?
              Daniel Nasseh

              Hi Ruben,


              thanks a lot. I was not that familar with variables in QV yet - so great advice! Works fine!

              So now with my button, i can change the value of the given variable to 1 or 0.

              Is it possible to change it to 1 if the variable is 0 and to 1 if the variable is 0 with the same button?


              I entered this "experimental" code into the value field of the button (instead of 1 or 0).



              Unfortunately does not work but i hope you get what i tried to achieve.


              It would be easy to solve it with two buttons, but is there a way to solve it with 1 button?