Combine dynamic zone visibility and user permissions to de-clutter your user interface

Here is a quick note on dynamic zone visibility and how you might use it to improve user experience apart from the obvious.

So, DZV is new since 2022.3 and you can use it to show and hide for example sheets dynamically based on a condition. Some caveats apply though:

Source: https://help.tableau.com/current/online/en-us/dynamic_zone_visibility.htm

Showing or hiding sheets is the obvious use case but more often than not, it’s the tiny things that go unnoticed.

So….

have you noticed you can dynamically show filters, parameters etc as well, not only sheets?

This opens up for example improvements on user experience.

Imagine you have a dashboard designed for quite a range of different users. Now it could be that some users are – based on your row level permissions – only eligible to see one country whilst others may see two or more.

Wouldn’t it be nice if we simply hide the unneeded country filter for those users that only have one country any ways? I consider a filter that does not offer any options to be unneeded visual ballast and bad user experience.

Unfortunately, as of now the conditions that DZV imposes interfere with row level permissions. So we need to do some prep work. Just using something like

{countd([Countries])} > 1

will not work as it – despite matching the LOD and bool condition that DZV imposes – it is still considered dependent on the visualization, thus obstructing the third condition, “independence from the viz”.

In fairness, I cannot tell you why that is at the moment, as even when the RLP check is inserted as a data source filter, it still interferes with the conditions.

There is, however a workaround.

In your data source (that is, not in Tableau) create the needed true/false checks. For example, something like this:

//sql example
IF (count(distinct a.region_country) over (partition by username)> 1, true, false) as vis_tf_region_country,

This will give us the needed result for every user in our data base.

Again, there is one more caveat:

This works only if your rlp / username column has only one user per row, i.e. you bloat your source when adding the permissions. If you are using concatenated names within on field, this will not work

This will give you a working source

SELECT
rlp.username,
a.*,
[...]
FROM a
LEFT JOIN rlp
ON ...

This will not

SELECT
string_agg(rlp.username, ' | ') as username,
a.xyz
a.abc
[...]
FROM a
LEFT JOIN rlp
ON ...
GROUP BY 1,2,3....

Ok, with that established next in Tableau we for whatever reason cannot directly use these t/f fields; they will just not show as an option for DZV. However, if we put them in a table scoped LOD, then it works.

//show/hide countries filter
{max([vis_tf_region_country])}

Now we can select this show/hide field as our DZV condition for the countries filter.

As the result a user that does not fulfill the condition of more than one country in his permissions will simply not see the countries filter.

In my opinion, a much better user experience with a less cluttered interface.

And that’s my idea for today.

I hope you found that useful and as always, appreciate your feedback.

Kind regards

Steffen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s