Document toolboxDocument toolbox

Support center for flex.bi version 4.0

Reports based on current user's e-mail

MDX function "CurrentUser()" returns an email of the user that is currently logged. Since flex.bi also imports a Person's e-mail this can be used in reports.

Here is an MDX example:

Filter(
[Person].Members,
[Person].CurrentMember.get("Person e-mail") = CurrentUser()
).Item(0)

The function checks all Persons and finds the one that has the matching e-mail address. This can be used to allow a user with 'view only' rights to see only reports about themselves.

Test it yourself! 

If you are entering activities in HansaWorld and they are imported into flex.bi, upload report definition from this report to your account: https://flex.bi/bi/accounts/47/cubes/HansaWorld%20CRM/reports/4036-current-users-activities-by-class-this-month

If you have sales in HansaWorld and they are imported into flex.bi, upload report definition from this report to your account: https://flex.bi/bi/accounts/47/cubes/HansaWorld%20Invoices/reports/4031-current-users-sales

Note that you need to import the report to your own account to be able to see data in it (as it is connected to your email address).

You will not be able to see data in the reports in the Templates account, because your email address is not registered in the test HansaWorld that is used to import data in these reports. When you import the report in your own account, the data will show up.