Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi; I know there is a Built in fields in Power BI Report Builder to get the logged in Username or User ID. What I need to do is pass the value of User ID to SQL to execute a stored procedure that will bring the correct dataset based on the permissions that user has in the database. Hope someone can suggest a way around this issue
Thanks, Can you pls provide the query in the Store Procedure to accept the User ID
@Vinay96 wrote:
Thanks, Can you pls provide the query in the Store Procedure to accept the User ID
I don't have any query. You asked how to pass a value to a stored procedure and I've showed you the steps to do this. You can put whatever logic you like in the stored procedure based on whatever data you have in your database.
If you pick the stored procedure option in the dataset properties, then navigate to the parameters settings it should list all the parameters for your stored procedure.
You can then click the fx button to add an expression and choose the UserID from the Built-in Fields
You will end up with a parameter setting that looks like the following and will pass the UserID value from the paginated report to your stored procedure
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
8 | |
3 | |
3 | |
2 | |
2 |
User | Count |
---|---|
15 | |
10 | |
6 | |
5 | |
4 |