Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bcap01
Helper II
Helper II

How to make Button decide which SSRS Report to open based on user

Hello,

 

I want to create a button on our BI Dashboard that goes to a report.  However, the report may be different depending on the user.  Is there a way to decide what report goes to who based on email?

 

For example, lets say I have (4) Users and (4) reports.  

 

If User is John.Doe@amce.com then the button directs to SSRS report http://SSRS/1

If User is Jan.Doe@amce.com then the button directs to SSRS report http://SSRS/2

If User is Joe.Doe@amce.com then the button directs to SSRS report http://SSRS/3

If User is Jill.Doe@amce.com then the button directs to SSRS report http://SSRS/4

 

Any help or advice is greatly appreciated, thank you in advance!

1 ACCEPTED SOLUTION
MAwwad
Super User
Super User

Yes, it is possible to create a button in Power BI that opens different SSRS reports based on the user.

Here are the general steps to accomplish this:

  1. Create a table in Power BI that maps each user to the corresponding report URL. The table should have two columns: one for the user email and one for the report URL.

  2. Create a button in your Power BI report using the "Button" visual. You can find this visual under the "Visualizations" pane.

  3. In the "Button" visual settings, go to the "Action" tab and select "Web URL" as the action type.

  4. In the "Web URL" field, enter an expression that uses the user's email address to look up the corresponding report URL from the table you created in step 1. You can use the DAX LOOKUPVALUE function to accomplish this. The expression should look something like this:

     
    LOOKUPVALUE(ReportTable[ReportURL], ReportTable[UserEmail], USERPRINCIPALNAME())

    This expression uses the USERPRINCIPALNAME() function to get the email address of the current user and then looks up the corresponding report URL in the table.

  5. Preview the report and test the button by clicking it. The button should open the correct SSRS report based on the user's email address.

Note that this solution assumes that you are using Power BI with Azure Active Directory (AAD) authentication, and that the user's email address is available as part of the AAD user context. If you are using a different authentication method, you may need to modify the expression in step 4 to get the user's email address from a different source.

View solution in original post

1 REPLY 1
MAwwad
Super User
Super User

Yes, it is possible to create a button in Power BI that opens different SSRS reports based on the user.

Here are the general steps to accomplish this:

  1. Create a table in Power BI that maps each user to the corresponding report URL. The table should have two columns: one for the user email and one for the report URL.

  2. Create a button in your Power BI report using the "Button" visual. You can find this visual under the "Visualizations" pane.

  3. In the "Button" visual settings, go to the "Action" tab and select "Web URL" as the action type.

  4. In the "Web URL" field, enter an expression that uses the user's email address to look up the corresponding report URL from the table you created in step 1. You can use the DAX LOOKUPVALUE function to accomplish this. The expression should look something like this:

     
    LOOKUPVALUE(ReportTable[ReportURL], ReportTable[UserEmail], USERPRINCIPALNAME())

    This expression uses the USERPRINCIPALNAME() function to get the email address of the current user and then looks up the corresponding report URL in the table.

  5. Preview the report and test the button by clicking it. The button should open the correct SSRS report based on the user's email address.

Note that this solution assumes that you are using Power BI with Azure Active Directory (AAD) authentication, and that the user's email address is available as part of the AAD user context. If you are using a different authentication method, you may need to modify the expression in step 4 to get the user's email address from a different source.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.