Dynamic Groups

3     0     Edited Oct 9, 2015

Overview

Dynamic Groups is a way to configure a set of groups that are automatically populated. With Dynamic Groups, you don't individually define each group.

Dynamic Groups are different than Individual Groups. RB users are likely most familiar with the classic Individual Groups. With Individual Groups, the syntax of each group is an expression that returns either true or false, representing whether or not the record belongs to the group. For example, a syntax of division=="Mountain" (or division_id==1) returns true if the record belongs to the Mountain division and false if not.

The syntax of a dynamic group doesn't return a boolean (true or false). Instead it returns a string. An example of dynamic group syntax is "division". It returns the string "Mountain" for some records, "Pacific" for other records, and so on. That returned string becomes the label of the group into which the record is assigned. During the computation stage, Report Builder will execute the dynamic group's syntax on each record to obtain a list of unique strings (e.g., "Mountain", "Pacific", etc.). That list of unique strings becomes the groups that are displayed in the output table/chart.



Uses

Dynamic Groups have many uses:

Hierarchies: Suppose you want to nest 3 variables that represent a hierarchy, such as: region, division and state. Individually defining all the groups, and nesting them, would produce extra non-applicable combinations. But defining the groups (or even just the latter 2 sets) as dynamic would yield a table that only shows the combinations that exist in the dataset.



Sparse Data: Suppose you are reporting on large list of employee names. Only a small handful of employees have data, and those are the only employees you wish to list in your output table. Define a dynamic group that returns the employee name and only the employees that exist in the dataset will appear in the output table.

Groups Unknown Beforehand: todo (e.g., BrainJuicer MindReaderĀ® data)

Time Series Data: todo

Other: todo, including note about performance of mutually exclusive nature of dynamic groups.

Integration with Individual Groups

Dynamic Groups may be used in combination with Individually Defined Groups. In the example below, Total, Segments and Gender are Individually Defined Groups. Region and Division are Dynamic Groups (indicated with an asterisk icon). Those groups will expand dynamically and display in the output table.



Note about Business Intelligence (BI) in General

The dynamic groups functionality is similar to the functionality of general business intelligence tools (e.g., Tableau) and also SQL queries. But dynamic groups pose some disadvantages such as not being able to define overlapping groups (all dynamically created groups are mutually exclusive), and not being able to originate from multiple variables (as in the case of a multi-response survey question). The fact that RB can mix a set of both dynamically-defined and individually-defined groups makes it quite powerful. Good luck trying to do that in SQL or other BI tools.


Notes

  • Sig testing does not yet work with dynamic groups. But it will!
  • Dynamic groups are initially ordered in alphabetical order, and will appear that way unless your table/chart is sorted. We do not yet have a way to define ordering of the dynamically populated entries. However, we do recognize that as an important addition, particularly if your dynamic groups represent time periods).
  • Keep in mind that you may use the standard "Limit" and "Offset" features of grouping to limit the number of entries and offset the starting index.
  • We plan to provide a way to apply string trimming rules to dynamic groups, just like with independently defined groups. (You can actually do this using custom syntax, but we want to make it easier).
  • We would like to provide an easy way to create rollups of dynamic groups. But for now, your rollups can be defined as independent groups.
  • In the Edit Groups Window, a shortcut has always been to click the right arrow before selecting any groups, and all the (individually-defined) groups would automatically select. This is still the case. The "(dynamic)" option is excluded from that, unless it is the only option.
  • You might wonder... "If it's possible to dynamically hide a (dynamic) group that doesn't exist in any records in the dataset, wouldn't it be possible to dynamically hide an individually defined group that doesn't exist in any records in the dataset?" If you wondered that, I agree! That's exactly right. It's a feature that is planned.



Leave a Comment

Please sign in to leave a comment.