Forum Discussion

YGL18's avatar
YGL18
Frequent Visitor
7 years ago
Solved

RLS tabular model filter does not recognize Username()

In Visual Studio I add the filter below to the 'Staff Education Organization' Table.

It only works if I add email address directly in the filter such as "[email protected]" instead of USERNAME().

but it does not work if I use USERNAME() function.

 

What can be the problem?

 

= 'Staff Education Organization'[SchoolID] =

          LOOKUPVALUE('Staff Education Organization'[SchoolID],

                                'Staff Education Organization'[ElectronicMailAddress],

                                 USERNAME()

                               )

 

Model Filter

  • This is what we found:

     

    Username() function is not returning clean email if email is added to AAD as a guest.

     

     

     

    It attaches this string at the front:

     

    live.com#

     

5 Replies