- Load or connect to the user role table described in the Getting ready section, from a Power BI data model:
- The user table should be hidden from the Fields List and should not have relationships to any other table
- Create DAX measures to return the user's role and sales territory values for group, country, and region:
User Principal Name = USERPRINCIPALNAME()User Sales Territory Key = LOOKUPVALUE('Sales User Roles'[SalesTerritoryKey],'Sales User Roles'[User Email Address],[User Principal Name])User Sales Role = VAR RoleLookup = LOOKUPVALUE('Sales User Roles'[User Role],'Sales User Roles'[User Email Address],[User Principal Name]) RETURN IF(ISBLANK(RoleLookup),"Role Not Found",RoleLookup)User Sales Group = IF([User Sales ...