CurrentUserName
EAZYBI Returns the name of the user who is currently using eazyBI
Syntax
CurrentUserName()
Arguments
No arguments
Examples
Current user from the Assignee dimension
This formula is to create a calculated member in the Assignee dimension that always represents the current user. If you select this calculated member in pages, the report will show information about issues assigned to the currently logged-in user.
[Assignee].Members.item( CurrentUserName() )
See report example Issues created vs resolved by priority in our Demo account. The calculated member Current Assignee in dimension Assignee uses the formula above to retrieve a logged in user.
Validate if the Assignee user by name is the logged-in user
The following formula will validate if the Assignee user by name is the logged-in user.
[Assignee].CurrentMember.Name = CurrentUserName()
See the report example Issues created vs resolved by priority in our Demo account. The calculated member Support and current assignee in dimension Assignee uses the formula above to retrieve a logged-in user by name. The formula for Support and current assignee will work for cases when currently logged-in user should see assigned issues and issues assigned to some specific user. You can select this calculated member on Pages to filter issues a user should work on.
Finding the current user in the user-picker Jira custom field
Another example would be finding the current user in the new user-picker Jira custom field once it is imported in eazyBI cube. In this case, the user picker Jira custom field is called "Author" and is imported as a dimension in eazyBI
[Author].[Author].GetMemberByKey( CurrentUserName() )
See also
- When using eazyBI for Jira, default user dimensions like Logged By, Assignee, Reporter, use CurrentUser function which returns user key as user name and user key do not match for these dimension members.