2 Replies Latest reply: Oct 13, 2017 3:23 PM by John Sample RSS

    Synchronizing multiple cylic groups

    John Sample


      I have a question on how to best solve a challenge I have.  It could be I am just not doing it the right way but perhaps you will have an idea what I am trying to do and can offer ideas.


      Scenario:  I have a table about equipment and in this table I have multiple partners IDs linked to other tables containing information about End User, Sold To, Current Customer, Ship To and Original Sold To. Each of these partners have similarly named fields like Name, City, Region and Country etc. I created cyclic groups so I can look at the “City” value for End user, Sold to, Current Customer, Ship To and Original Sold To.  This allows me to look at the equipment statistics for each of the various partners.


      I have various charts displayed in nested containers which use these cyclic groups.  They may appear to be labeled the same but they are linked to different fields from each of the linked tables. I would like to synchronize the user selected group (which is actually the active partner table) across all charts.  So for example, if the user is viewing a chart that displays the number of partners by country and the active cyclic group is changed from “End User”, I would like the other charts that are displaying data for Region and City for example to also be synchronized so they are also using data on the “End User” table and so on. 


      Here is an example of one of my charts:



      If the user changes the group from “Curr Cust” for to “Ship To”, then I would like all of the other cyclic groups on my other charts to synchronize on “Ship To” as well.


      Here is part of the data model so you can better see what I am trying to do:




      So, my question is how might I sync the multiple cyclic groups so users do not have to manually change each charts every time the group is changed?




        • Re: Synchronizing multiple cylic groups
          Marcus Sommer

          It's not possible to synchronize multiple dimension-groups directly - they are completely independent to eachother. Possible workarounds could be to define several slightly different groups and control their visibility with a condition like:


          pick(match(getcurrentfield(Group1), 'A', 'B', 'C'),

               Group2A, Group2B, Group2C)


          Another way might be to replace the dimension-groups with a variable-logic which wouldn't be easy to implement and would have quite probably some lost or at least changed usability.


          A further approach could be to change the order within the groups with macros which won't work with the AJAX client and which might need some efforts to develop, too. If you consider this option seriously you should take a look into the APIGuide.qvw for methods, parameters and examples (is in your install-folder by automation).


          - Marcus

            • Re: Synchronizing multiple cylic groups
              John Sample


              Thank you for your reply.  I ended up creating a variable to store the name of the selected partner. That variable is then driven by a set of buttons the user click on.  I then created calculated dimension lists that are created using the pick match functions (you suggested).  It took me a little to get the syntax just right but now it works and I am very pleased.


              This is an example of how the dimension is selected for Country:

              =pick(match((vPartner),'End User','Orig Sold To','Sold To','Curr Cust','Ship To','Key Cust'),[End User Country],[Orgin Sold to Country],[Sold to Country],[CurrCustomer Country],[Ship to Country],KeyCustomers.Country)



              I then made similar dimensions for City, Region and Customer Name lists.  They are all driven with a single click on a button as desired. Awesome and not to tough.