Dynamic Dropdown Navigation in PowerBI

I have already done a video/post on how to implement a static drop down navigation, so in this tutorial I will cover how to implement a dropdown navigation where options are dynamically populated based on the identity of the user.

The Power BI desktop file used in this tutorial can be downloaded here.

The steps are the following:

  1. Create the Navigation table that will contain all of the pages available to navigate to
  2. Create a mapping table that will specify which pages are available to which user
  3. Create a Row Level Security rule to apply DAX filter on the Navigation table to dynamically filter pages that the user is not supposed to see

Navigation Table:

NavigationMap table:

Relationships – make sure the two tables are not connected:

DAX:

currentUser = USERPRINCIPALNAME()
NavigatePage = 
var page = SELECTEDVALUE(Navigation[Page])
var pageNo = SELECTEDVALUE(Navigation[Sort Order])

return IF(pageNo = 0, BLANK(), page)

DAX for RLS:

[Sort Order] = 0 
||
contains
(
  NavigationMap, 
  NavigationMap[Page], 
  [Page],
  NavigationMap[User], 
  [currentUser]
)

One thought on “Dynamic Dropdown Navigation in PowerBI

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 )

Facebook photo

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

Connecting to %s