How to Disconnect Data Sets in Document Layouts

A word of warning, I’m not exactly sure how the feature I’m going to talk about works.  It’s one of those features that most of us just tinker with all of the options until we get the result we want, like Level Metrics or Attribute Join Types.  Document Virtual Datasets have been confounding us for years, and with the addition of added control over Primary and Secondary joins in 9.0.1, it got even weirder.

The other day I had an issue where I needed to use two separate data sets with the same attribute on them, but they meant different things.  The Document insisted on joining them together, so a selector contained results from both data sets instead of individual.  I did stumble across a strange set of actions that allowed me to disconnect the data sets by using Layouts, so today I’ll share what could possibly be a bug or intended behavior that I just don’t fully understand.  Please feel free to enlighten me in the comments!

I’m currently using 9.0.2, so I’m not sure if this applies to all versions or just this one.  To reproduce this yourself, you could build a Document along the following lines:

You have two data sets, both with Region and State attributes, and the Revenue metric.  One data set is filtered for North East region, and the other data set is filtered for the South East region.  Now you want to have two separate layout tabs, and each grid on separate tabs.  You want a drop down selector to choose a single State for each data set.

The issue is that the way Documents work is that they join to create a single virtual data set of all data sets contained in the document.  This means that both of my State drop downs will contain all of the States from both Regions.  This isn’t what I want, because choosing a South East State for the North East tab will result in no data.  I tried tinkering with all of the Document settings, and wasn’t able to get them to ignore each other.

I did somehow stumble on a method of creating the Document to get them to disconnect each other, and it works like this:

Create two separate documents and set them up how you want them.  Then, in the first one, add a new layout and you’ll have the option to import an existing document.  Choose your 2nd Dashboard, and it will import it as the 2nd layout.  You can now delete the 2nd document, as it made a copy, not a link.

Your document now has 2 layout tabs and the data sets are completely disconnected.  I’m not sure if this is by design because I haven’t been able to get it to work any other way, so it’s probably exploiting a bug.  If you add a Grid object to the Layout, even just an empty grid object without any objects on it, then the data sets get merged again, so make sure you’ve got everything the way you want before you do the import.

I suspect this behavior isn’t intended, but it did save me the other day from having to tell a user that their Document would need to be 4 separate Documents.  Using this trick, I was able to meet the spec and deliver a single Document with 4 tabs.  Of course, maintenance will be a little bit annoying since I would have to delete a layout and re-import it to make any grid related changes to it, not to mention that if it is a bug, it may not perform this way in future releases.  Either way, perhaps this little trick will help you some day as it helped me.

If you understand what’s going on here or have more to add, please feel free to drop more info in the comments.  Thanks!

You may also like...