Power BI
Needs VotesProvide username function in Power Query - M or DAX calculated columns
Being restricted to just using username () in measures (or AllowedRowsExpression) means that you cannot use the context of the current user in slicers or page level or report level filters.
Just to be clear, the desired result is not data security (that can be done through roles), it is to provide relevance. We want to be able to show a page that shows (for example) My Teams timesheet hours, perhaps next to a report page that shows an overview of the entire company.
You can provide some neat filtering using measures containing username () , but in particular, you can’t provide slicers (or page filters) that are cut down to just the list of relevant items based on the user logged in.
It would be extremely helpful if you could access the username value either via a function in PowerQuery M, or to allow username () to be referenced in a calculated column using DAX.
Trying to use username () in a calculated column currently gives the error:
"CUSTOMDATA and USERNAME functions are not supported in calculated columns. These functions may only be used in Measures or in the AllowedRowsExpression."
Perhaps there are security, functional or performance reasons why this isn't possible, but thought it worth putting forward.
- Comments (41)
RE: Provide username function in Power Query - M or DAX calculated columns
I would need it also.
RE: Provide username function in Power Query - M or DAX calculated columns
Functionality please.
RE: Provide username function in Power Query - M or DAX calculated columns
We need to have this feature now. Why is this not in this tool yet?!?!
RE: Provide username function in Power Query - M or DAX calculated columns
We would recommend this strongly as this would help the community to implement dynamic row level security. Without this, the solution requires us to go for one more layer or other complex solutions which is expensive.
RE: Provide username function in Power Query - M or DAX calculated columns
We need this urgently for dynamic RLS!!!
RE: Provide username function in Power Query - M or DAX calculated columns
Just another reason why we are seriously starting to consider other BI tools. This is a basic feature that should have been available a long time ago.
RE: Provide username function in Power Query - M or DAX calculated columns
We need this so we can still display the data (not filter out with RLS), but instead to customize what is displayed for the current user.
RE: Provide username function in Power Query - M or DAX calculated columns
Yes please!
RE: Provide username function in Power Query - M or DAX calculated columns
Must have yesterday
RE: Provide username function in Power Query - M or DAX calculated columns
Adding this feature would really help to improve efficiency of queries and extend Power BI's usage. I don't understand why it is not already available.