Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have a requriement to show data based logged in user. The logged in user (USERPRINCIPALNAME) need to be passed to query as a parameter user_id to the backend direct query. Data is huge cannot do import mode.
For example --
select sec_lev_grant from table where upper(user_id) = upper('user_id@domain.com')
Thanks in advance
Thank you for the quick response.
What is the fact ?
Here's what I have
yes. dont import your table. and dont use dynamic query. just create a table contains IDs and use it also in import mode and let the relationship do the filtrations
something like the following image
USERPRINCIPALNAME() will filter the dimention that will have a join in your database with the right id
This solution didn't work. Not sure If I am missing anything. Can you please provide more details.
Thank you for the reply. Without dynamic query I am confused how it filters the data.
Is fact a table that we get the results from the query and UserDim is the measure ?
1- create a table contains the user emails in your database
2- make a relationship in power bi datamodel between this table and your fact
3- filter the new table using Row level security.
this will achive your Goal
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
55 | |
53 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |