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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello everyone,
I'm facing an issue with the use of Username() or UserPrincipalName() in a report
I have to build a report to allow my ressources to track the projects on which they are assigned, I cannot used RLS due to the need of this ressources to see more details on other reports using the same dataset
If I use the following measure:
The ID in the ressources table, is the project ID, so my table ressource contains this kind of information
| ID Project | ResourceMail |
| 1 | ResourceA@microsoft.com |
| 2 | ResourceA@microsoft.com |
| 2 | ResourceB@microsoft.com |
| 2 | ResourceC@microsoft.com |
| 3 | ResourceB@microsoft.com |
| 3 | ResourceC@microsoft.com |
Solved! Go to Solution.
Try this measure
ProjectResourceVisibility =
VAR CurrentUser = USERPRINCIPALNAME()
RETURN
IF(
CALCULATE(
COUNTROWS(Ressources),
FILTER(Ressources, Ressources[ResourceMail] = CurrentUser)
) > 0,
1,
0
)
Try this measure
ProjectResourceVisibility =
VAR CurrentUser = USERPRINCIPALNAME()
RETURN
IF(
CALCULATE(
COUNTROWS(Ressources),
FILTER(Ressources, Ressources[ResourceMail] = CurrentUser)
) > 0,
1,
0
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 125 | |
| 108 | |
| 46 | |
| 29 | |
| 27 |