Logo
banner

Blogs

Dynamic page navigation in Power BI based as per User Role

, March 1, 2024 360 Views

In Power BI, providing page security and role-based access to users traditionally involves creating different workspaces or different audiences in one app workspace. However, an innovative approach is to achieve this using measures, eliminating the need for additional workspaces and audiences. In this blog post, we will explore a real-time requirement where we need to show/hide report pages based on user role types while implementing data-level security through Row-Level Security (RLS).

Scenario:

Consider a scenario where the objective is to dynamically display Power BI report pages according to the role type of each user in an organization. For instance, if a user is classified as a distributor, they should be directed to the Distributor Dashboard. Similarly, users with roles such as dealer or other types should be directed to their respective pages.

Now, let’s delve into the implementation details to achieve this dynamic page display based on user role types.

Implementation:

In our Power BI report, we aim to establish role-based access with distinct pages catering to each role type. Instead of relying on multiple workspaces, we’ll employ measures to achieve dynamic page navigation, enhancing the user experience. This blog post outlines the process, starting with the creation of a universal Introduction Page/Navigation Page that remains consistent across all role types.

This implementation has 3 important steps:

Creating the Introduction Page: To provide a seamless navigation experience, we’ll craft an Introduction Page that acts as a centralized hub for users of different role types. This page will serve as a starting point for users, ensuring a uniform introduction before branching into role-specific dashboards.

Button-Based Dynamic Text: To make the Introduction Page adaptive, we’ll incorporate a button that dynamically changes its text based on the user’s role type. This personalized touch enhances user engagement and provides clarity on their designated role.

Measures for Dynamic Title and Navigation: Utilizing measures, we will dynamically generate the title on the button and facilitate dynamic page navigation. These measures will consider the user’s role type, ensuring that the content presented aligns with their specific responsibilities and requirements.

Before delving into the implementation details, let’s take a closer look at the data at our disposal. Understanding the dataset is crucial for crafting measures that accurately reflect each user’s role type and enable effective dynamic navigation.

Now, let’s create a measure and give it the name DynamicTitleButton to show the page name on the button based on the user’s role type.

Now, click on the button and go to Style->Text->Select Field Value in the Format Style and apply this measure.

Now, let’s create a measure and give it a name as DynamicPageNavigation to navigate to different pages based on the user’s role type.

Now, click on the button and go to Action->Select Type as Page navigation->Destination and apply this measure.

We are done with the implementation. Now, it’s time to see the results.

 


Discover the power of our services:

Microsoft Fabric, Power BI, Microsoft Business Intelligence, SQL Server, and Business Central. By the power of these services, from advanced analytics to seamless business integration, we’ve got the expertise you need to optimize operations and drive growth. Harness the potential of your data infrastructure with our comprehensive suite of solutions.


 

Let’s test for the User with Distributor Role Type:
As per the Admin table, Keyur has a Distributor Role Type.

As we can see the title for the button is Distributor Dashboard. So, if he clicks on the button, he will be navigated to the Distributor Dashboard page.

Let’s test for the User with Dealer Role Type:
As per the Admin table, Punit has a Dealer Role Type.

As we can see the title for the button is Dealer Dashboard. So, if he clicks on the button, he will be navigated to the Dealer Dashboard page.

So, DAXperts we just navigated dynamically to different pages and achieved page level security in the Power BI report.

Conclusion:

By implementing these measures, you can achieve page security and role-based access in Power BI without the need for separate workspaces or audiences. This approach enhances the flexibility of report management and ensures a personalized experience for users based on their roles within the organization and removes the process of adding a new member to the group/audience/workspace every time. We only need to add a new user to the admin table or change the role in the admin table if we want to change the access.


Know the number of records in any Dataverse entity or table.
https://www.inkeysolutions.com/entity-record-counter

ATM Inspection PowerApp to ease ATM inspection and report generation process.
https://www.inkeysolutions.com/microsoft-power-platform/power-app/atm-inspection

Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/drag-and-drop-listbox

Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
https://www.inkeysolutions.com/microsoft-dynamics-365/dynamicscrmaddons/gdpr

Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/view-creator

mm

Inkey

INKEY is your solution partner.
Our focus is to deliver you in-time intelligent innovative solutions ("key") for the problems in hand. Maintaining a quality standard right from the inception of a project is our top most priority.

Our team of talented professionals will execute your projects with dedication and excellence. We take ownership and accountability for the effort that goes into meeting our client’s needs.

Years of experience and proven success of delivering innovative custom solutions.

More posts by

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 2 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Drop file here

Would you like to digitize your business and put it on the cloud?
Do you need clear, concise reports for your organization?