Forum Discussion
Dynamic filter using lookups
- 9 months ago
You can achieve this in Power BI using DAX — it just requires a different mindset than Tableau.
Instead of a boolean filter, you can create a measure that checks if a project is owned by the selected manager’s team, either directly (project owner) or indirectly (task owner).
For example:
ShowProject =
VAR SelectedManager = SELECTEDVALUE(Users[Manager])
VAR ManagedUsers = FILTER(Users, Users[Manager] = SelectedManager)
VAR HasDirectOwnership =
Projects[OwnerID] IN SELECTCOLUMNS(ManagedUsers, "UserID", Users[UserID])
VAR HasTaskOwnership =
COUNTROWS(
FILTER(Tasks,
Tasks[ProjectID] = Projects[ProjectID] &&
Tasks[OwnerID] IN SELECTCOLUMNS(ManagedUsers, "UserID", Users[UserID])
)
) > 0
RETURN IF(HasDirectOwnership || HasTaskOwnership, 1, 0)
Then use this measure as a visual-level filter (ShowProject = 1).
It gives the same effect as your Tableau logic — filtering projects dynamically based on the selected manager and their team.
For a similar concept and more details, you can also check Microsoft’s official documentation on Row-Level Security (RLS) in Fabric:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rufyda Rahma | Microsoft MIE
https: Rufyda Rahma | LinkedIn
Blog : Rufyda Rahma – Medium
You can achieve this in Power BI using DAX — it just requires a different mindset than Tableau.
Instead of a boolean filter, you can create a measure that checks if a project is owned by the selected manager’s team, either directly (project owner) or indirectly (task owner).
For example:
ShowProject =
VAR SelectedManager = SELECTEDVALUE(Users[Manager])
VAR ManagedUsers = FILTER(Users, Users[Manager] = SelectedManager)
VAR HasDirectOwnership =
Projects[OwnerID] IN SELECTCOLUMNS(ManagedUsers, "UserID", Users[UserID])
VAR HasTaskOwnership =
COUNTROWS(
FILTER(Tasks,
Tasks[ProjectID] = Projects[ProjectID] &&
Tasks[OwnerID] IN SELECTCOLUMNS(ManagedUsers, "UserID", Users[UserID])
)
) > 0
RETURN IF(HasDirectOwnership || HasTaskOwnership, 1, 0)
Then use this measure as a visual-level filter (ShowProject = 1).
It gives the same effect as your Tableau logic — filtering projects dynamically based on the selected manager and their team.
For a similar concept and more details, you can also check Microsoft’s official documentation on Row-Level Security (RLS) in Fabric:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rufyda Rahma | Microsoft MIE
https: Rufyda Rahma | LinkedIn
Blog : Rufyda Rahma – Medium
- Rufyda9 months agoSuper User
Maybe the issue happens because your tables are being filtered too early.
To fix it, use ALL() inside your DAX formula — this removes unwanted filters before the calculation runs.
Show Project =
VAR SelectedManager = SELECTEDVALUE(Managers[Manager])
VAR ManagedUsers = FILTER(ALL(Managers), Managers[Manager] = SelectedManager)
VAR HasDirectOwnership =
'planview rpt_programs (3)'[tech_prog_mgr]
IN SELECTCOLUMNS(ManagedUsers, "UserName", Managers[User Name])
VAR HasTaskOwnership =
COUNTROWS(
FILTER(
ALL('planview rpt_raid'),
'planview rpt_raid'[parent_task_key] = 'planview rpt_programs (3)'[primary_key] &&
'planview rpt_raid'[resource]
IN SELECTCOLUMNS(ManagedUsers, "UserName", Managers[User Name])
)
) > 0
RETURN IF(HasDirectOwnership || HasTaskOwnership, 1, 0)
ALL() makes sure your FILTER sees all rows and ignores the existing context filters.
This way, the formula correctly shows projects owned either directly by the manager’s team or by anyone who owns a task within that project. - lbendlin9 months agoSuper User
Remember that your FILTER is applied on top of the current filter context. Better use
VAR ManagedUsers = FILTER(ALL(Managers),[Manager]=SelectedManager)