Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi Team,
I have to create a user report below is an example of the data set.
I have to show data of only those users who logged in.
user name who logged in I can get it from the (USERNAME() // or USERPRINCIPALNAME()) function.
Not getting how to filter data from the dataset dynamically. I don't want to use row-level security.
it's fine that the user can view all the data from the dataset if he wants but first-time users should see their own data.
Not getting any response just checking is it possible or not in Power BI desktop?
1 . Full Dataset
ID | Name | Sales | |
1 | Alex | 1000 | |
2 | Jack | 2000 | |
3 | Alex | 200 | |
4 | Chris | 300 |
2. When Alex logs in he should see data like
ID | Name | Sales | |
1 | Alex | 1000 | |
3 | Alex | 200 |
Solved! Go to Solution.
Hi @RAWA96 ,
There is no native function to get the username in Power Query.
But based on the description since users have the option to view their own and all data, you may choose to consider using Enter tables and measure to filter reports.
Measure =
IF (
SELECTEDVALUE ( 'Table 2'[Data] ) = "All data",
1,
IF ( SELECTEDVALUE ( 'Table'[Email] ) = USERPRINCIPALNAME (), 1 )
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @RAWA96 ,
There is no native function to get the username in Power Query.
But based on the description since users have the option to view their own and all data, you may choose to consider using Enter tables and measure to filter reports.
Measure =
IF (
SELECTEDVALUE ( 'Table 2'[Data] ) = "All data",
1,
IF ( SELECTEDVALUE ( 'Table'[Email] ) = USERPRINCIPALNAME (), 1 )
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Thanks, Gao! It worked.
I have one more question I have to show the sum of Sales total in Cards and it should also filter according to user login, how can I do that?
I tried but I am able to see the full values.
also, can we filter data on the basis of multiple columns like if I have two columns as email id one for supervisor and one for employee?
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 18 | |
| 13 | |
| 9 | |
| 8 | |
| 8 |