How to filter the current user with measures in your Dynamics 365 Business Central embedded Power BI report.
CurrentUser = USERPRINCIPALNAME()
FilterByViewer = IF(SELECTEDVALUE(UserApprovalSetup[E_Mail])=[CurrentUser],1,0)
In this example the current table was 'UserApprovalSetup' and the column with user email in was 'E_Mail'.
The second measure now returns a 1 on any row where the 'E_mail' in the underlying table matches the current user. So we can do a simple visual filter:
|Visual filter on the 2nd measure 'FilterByViewer'. Lock or hide if necessary.|
That's it! very simple to use.