Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear All,
Looking for your help in the following scenario, either in the calculated column or in the query form M.
I have the details like Ename, Role & Mname.
This is a basic query in SQL, that is, a manager can be an employee, but all employees cannot be managers. I need to find the list of employees under each manager.
So I need to derive a new column in PowerBI that could tell if the title is manager or not.
Also, I can enforce row level security for each manager so that they can see only the employee below them.
Cheers
Abhi
Solved! Go to Solution.
Hi, @Anonymous
It’s my pleasure to answer for you.
According to your description, I think create a calculate column to judge the title is manager or not.
Like this:
Title3 =
IF (
MAXX (
FILTER ( ALL ( Table2 ), Table2[Ename] = EARLIER ( Table2[Mname] ) ),
Table2[Role]
) = "Manager",
"SM"
)Or a measure:
title =
IF (
MAXX (
FILTER ( ALL ( Table2 ), Table2[Ename] = SELECTEDVALUE ( Table2[Mname] ) ),
Table2[Role]
) = "Manager",
"SM"
)
If you have other questions, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
It’s my pleasure to answer for you.
According to your description, I think create a calculate column to judge the title is manager or not.
Like this:
Title3 =
IF (
MAXX (
FILTER ( ALL ( Table2 ), Table2[Ename] = EARLIER ( Table2[Mname] ) ),
Table2[Role]
) = "Manager",
"SM"
)Or a measure:
title =
IF (
MAXX (
FILTER ( ALL ( Table2 ), Table2[Ename] = SELECTEDVALUE ( Table2[Mname] ) ),
Table2[Role]
) = "Manager",
"SM"
)
If you have other questions, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Not very clear. Refer if these can help
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies
Hi Amit,
Thanks for the response.
The link you shared is more on RLS, before using RLS I need to derive last column Title which can basically filter all employees based on their manager.
Regards,
Abhi
@Anonymous
Can you refer to this thread on the same:
https://community.powerbi.com/t5/Desktop/Employee-Manager-Calculated-column/m-p/1417065#M598814
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |