Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I'm trying to filter data by the username of the current logged-in client. I realize there are solutions to this, RLS is enabled, but we don't have SSAS to manage the aggregations outside of PBI.
I created a measure that looks up a 'tag' value of the username() and a table that matches the username to a site location. Then I'm trying to create a column that calculates the max of the site number and filter on the measure's value.
CheckSite = IF(LOOKUPVALUE(UsersTab[Tag], UserTabs[Domain], USERNAME()), 1, 0)
CheckSecurity = CALCULATE(MAX(UsersTab[Site_Number]), FILTER(UsersTab, [CheckSite]= 1))
I was hoping to use the CheckSecurity column as a report-level filter, but I get an error that username() is not allowed in columns.
I'm trying to circumvent these restricts, but so far no luck.
Thanks!
Hi @Gutenvirt,
Currently, in Power BI Desktop, it is not supported to use USERNAME() function in calculated column, you can vote the following idea about this issue.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13926666-provide-username-functio...
Thanks,
Lydia Zhang
Hi @Gutenvirt,
Did you try to create the roles in the Pbix file based on the information you want user to see and then add the e-mails of each user in the power bi online? It's a little work at first but after the first setup it works nice, at least in my testing it worked.
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |