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
Good morning, I have the following problem. I have a table with user code, name and boss code. I want to generate a segmenter that allows me to select a name and bring me the data of that user and all their employees.
And for an event to go under investigation, it must first be classified. And in order to generate the actions, it must first be investigated.
It would be so, the first table is the table of facts. It contains the event number, the code of the person who classifies it, classification status, the research number (which coincides with the event number), the code of the person who investigates it, the status of the research, the action code (several actions can be derived from an investigation), the code of the person who must perform it and the status of the action. A person may have to classify, investigate or perform an action. The second table has the codes of each user, the name and the code of their boss. In the example case it is a linear chain: So-and-so is the boss of So-and-so and So-and-so is the boss of Pepito. What I want to achieve is a visual with events and research (since they have the same code) and a visual one with the actions. And put a person in the slicer. So if I put So-and-so I should see all the data of the tasks. If I put Menganito I should see the data of Menganito and Pepito's tasks. If I put Jiminy to see Jiminy's data alone because he has no subordinates.
Hi @Syndicate_Admin ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a table.
Slicer_name = VALUES('Table'[Nombre])
(3) We can create a measure.
Flag =
var _slicer=SELECTEDVALUE('Slicer_name'[Nombre])
var _boss_code=CALCULATE(SUM('Table'[Codigo Jefe]),FILTER(ALL('Table'),[Nombre]=_slicer))
RETURN IF(MAX('Table'[Codigo Jefe])=_boss_code,1,0)
(4) Place [Flag=1] on the visual 1 and visual 2 object's filter and then the result is as follows.
By selecting the user name in the slicer, visual object 1 will show the boss code for that user and visual object 2 will show all users under that user's boss.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello good afternoon, what I want you to do is that if you select a user bring all the subordinates and the subordinates of their subordinates, until you reach the person without subordinates
Hi,
The PARCHCONTAINS() function should work. For more specific help, share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
| Event | Event Description | Sorter | Classification Status | Research | Research Leader | Research Status | Action | Action Description | Responsible | Statement of Action |
| 1 | - | 200 | Classified | 1 | 201 | Investigated | 1 | - | 202 | Made |
| 1 | - | 200 | Classified | 1 | 201 | Investigated | 2 | - | 200 | Made |
| 2 | - | 201 | Not Classified | |||||||
| 3 | - | 202 | Classified | 3 | 200 | Not Investigated | ||||
| 4 | - | 200 | Classified | 4 | 201 | Investigated | 3 | - | 202 | Made |
| 4 | - | 200 | Classified | 4 | 201 | Investigated | 4 | - | 202 | Earring |
| 4 | - | 200 | Classified | 4 | 201 | Investigated | 5 | - | 201 | Earring |
| 5 | - | 201 | Classified | 5 | 202 | Investigated | 6 | - | 200 | Made |
| 5 | - | 201 | Classified | 5 | 202 | Investigated | 7 | - | 200 | Made |
| 5 | - | 201 | Classified | 5 | 202 | Investigated | 8 | - | 201 | Made |
| 5 | - | 201 | Classified | 5 | 202 | Investigated | 9 | - | 202 | Earring |
| 5 | - | 201 | Classified | 5 | 202 | Investigated | 10 | - | 200 | Earring |
| User Code | User | Boss Code |
| 200 | So-and-so | - |
| 201 | Stuttgart | 200 |
| 202 | Pepito | 201 |
Due to confidentiality issues I cannot upload the original tables. By way of example, these would be these. The objective would be if I select So-and-so to see all the data in three different visuals one for events, one for research and one for actions, if I select So-and-so to see only his data and Pepito's. And finally, if Pepito was selected, only see his data.
Sorry but cannot understand anything there.
Sorry for the data in this way but it did not let me load excel or power bi.
The table would look like this and is connected to other tables using user code.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 107 | |
| 92 | |
| 54 | |
| 46 |