问题
I have Row Level Security applied in Dynamics CRM for Power BI embedded. The logged in user only sees their data and now I'd like for them to see all teams data that the logged in user is part of.
Bring back all team data that Lucy appears in:
Logged in user: Lucy Username: user1
TEAM A
Record 1 (Lucy)
Record 2 (Bob)
Record 3 (Lucy)
TEAM B
Record 4 (Lucy)
Record 5 (Kate)
Record 6 (Paul)
TEAM C
Record 7 (Lucy)
Record 8 (Bill)
Team D
Record 9 (John)
Record 10 (Jane)
The DAX should bring back all records from Team A
, Team B
and Team C
but not Team D
as Lucy is not in this team.
I have tried this code:
EVALUATE
FILTER(
Teams,
AND(Teams[Members] = "Lucy",Teams[User] = "user1"))
However the above code only shows the filtered out values.
I want to show all the names that appear in the teams if the logged in user is part of that team.
How would this be written using DAX?
来源:https://stackoverflow.com/questions/56221161/dax-bring-back-all-records-from-a-team-where-the-logged-in-user-is-in-the-team