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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bvsaicharitha
Helper I
Helper I

Input text option to enter user ID to display only the information related to user

HI,

I would like to create a dashboard where I want to provide a text field for the user to enter his ID and password and then he can see the information related to his performance and also the performace of the members who work under him. Can you please help me how can I do that in Power BI desktop?

1 ACCEPTED SOLUTION

@bvsaicharitha,

Please do the following for this to work

 

1. Create a data set which has the mapping between your user and the column on which the data is to be restricted

 

For Eg. I am having a category and each category will have users associated with it

So I will have a table that has that mapping as shown below

 

AA@gmail.com
BB@microsoft.com
CC@yahoo.com
DD@xyz.com

 

 

2. Now this new table with your existing data based on the column present, as just joining the queries might not work as expected

 

In my case, I will merge my data query and User mapping query based on Category

 

 

merging.PNG

 

 

3. Now create a parameter that will get the User Email ID as the input. Filter the merged query on the Email Column with this parameter. Set the parameter as required.

 parameter1.PNG

 filtering.PNG

 

 

 

Usermapping.UserEmail is the table that has the mapping between User and column to be restricted on

 

4. Now save this report as a template. i.e. a .pbit file

 

Now when you open the report template, it will prompt for a value for the parameter. This happens everytime your report template is opened

 

The User who opens the report will give his/her email Id and the data will get filtered only such that only those records having their email ID will get filtered.

 

Note: This will work only in Power BI Desktop and not in Power BI Service.

 

Regards,

Thejeswar

View solution in original post

3 REPLIES 3
Thejeswar
Community Champion
Community Champion

@bvsaicharitha,

I think the following link speaks about your requirement.

 

Check it out please

 

https://stackoverflow.com/questions/49902465/how-we-can-pass-logged-in-user-name-to-fetch-data-from-...

 

 

Thanks for the reply. I am not using any database. I am importing data directly from excel files. Can you help me how can I go with it? 

@bvsaicharitha,

Please do the following for this to work

 

1. Create a data set which has the mapping between your user and the column on which the data is to be restricted

 

For Eg. I am having a category and each category will have users associated with it

So I will have a table that has that mapping as shown below

 

AA@gmail.com
BB@microsoft.com
CC@yahoo.com
DD@xyz.com

 

 

2. Now this new table with your existing data based on the column present, as just joining the queries might not work as expected

 

In my case, I will merge my data query and User mapping query based on Category

 

 

merging.PNG

 

 

3. Now create a parameter that will get the User Email ID as the input. Filter the merged query on the Email Column with this parameter. Set the parameter as required.

 parameter1.PNG

 filtering.PNG

 

 

 

Usermapping.UserEmail is the table that has the mapping between User and column to be restricted on

 

4. Now save this report as a template. i.e. a .pbit file

 

Now when you open the report template, it will prompt for a value for the parameter. This happens everytime your report template is opened

 

The User who opens the report will give his/her email Id and the data will get filtered only such that only those records having their email ID will get filtered.

 

Note: This will work only in Power BI Desktop and not in Power BI Service.

 

Regards,

Thejeswar

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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