Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
Scenario: We have Employee ID Slicer and Employee Level slicer. and Below we have table in that we need to have Employee ID Employeee name his Level and Manger Name.
Employee ID | Employee Name | Employee Level | Manager ID | Manager Name |
400 | Mahesh | 0 | ||
401 | Kishore | 1 | 400 | Mahesh |
402 | Vijay | 1 | 400 | Mahesh |
403 | Suresh | 1 | 400 | Mahesh |
404 | Sunil | 2 | 402 | Vijay |
405 | Rakesh | 2 | 403 | Suresh |
406 | Shyam Sunder | 2 | 401 | Kishore |
407 | Gunjan | 3 | 404 | Sunil |
408 | Nitchala | 3 | 406 | Shyam Sunder |
409 | Srikar | 3 | 405 | Rakesh |
410 | Sai Kiran | 3 | 404 | Sunil |
Whenever we click on perticular employee ID (400) from the slicer, I need to filter the data in the table with the selected that is Mahesh and his details like below table.
Employee ID | Employee Name | Employee Level | Manager ID | Manager Name |
401 | Kishore | 1 | 400 | Mahesh |
402 | Vijay | 1 | 400 | Mahesh |
403 | Suresh | 1 | 400 | Mahesh |
And When I go to employee Level slicer there i can see (L1,L2,L3 Values), If i select Level L2, I need to do filter Like below table.
Employee ID | Employee Name | Employee Level | Manager ID | Manager Name |
401 | Kishore | 1 | 400 | Mahesh |
402 | Vijay | 1 | 400 | Mahesh |
403 | Suresh | 1 | 400 | Mahesh |
404 | Sunil | 2 | 402 | Vijay |
405 | Rakesh | 2 | 403 | Suresh |
406 | Shyam Sunder | 2 | 401 | Kishore |
Same like when I select Level 3 i need to get the data like below table.
Employee ID | Employee Name | Employee Level | Manager ID | Manager Name |
401 | Kishore | 1 | 400 | Mahesh |
402 | Vijay | 1 | 400 | Mahesh |
403 | Suresh | 1 | 400 | Mahesh |
404 | Sunil | 2 | 402 | Vijay |
405 | Rakesh | 2 | 403 | Suresh |
406 | Shyam Sunder | 2 | 401 | Kishore |
407 | Gunjan | 3 | 404 | Sunil |
408 | Nitchala | 3 | 406 | Shyam Sunder |
409 | Srikar | 3 | 405 | Rakesh |
410 | Sai Kiran | 3 | 404 | Sunil |
Request you to please help me on this Logic
Thanks in advance.
Hi, @Anonymous
What's the logic when these two slicer "Employee ID Slicer and Employee Level slicer" are selected at the same time?
Janey
When we select Employee ID Slicer for example if i will select employee 401 that means it will get Kishore and his reporting manager Mahesh, after that i will go to Level slicer If i select Level "2" i need to get the data like whover is reporting to Kishore those information as well. then the table should become as like below.
Employee ID | Employee Name | Employee Level | Manager ID | Manager Name |
401 | Kishore | 1 | 400 | Mahesh |
406 | Shyam Sunder | 2 | 401 | Kishore |
Hi, @Anonymous
So for Employee ID Slicer, In addition to 400 choose 401, 402, 403, other choices only show the one you choose?
For Employee Level slicer, Why choose 3, the rows containing 1, 2, 3 will also appear,
So what happens when only 1 is selected? The row with 0 never appears?
Although your table contains paths, your requirements seem to be more strange than the logic of paths, and it is difficult to unify the logic...You have to know that the two slicers will affect each other. I need a logic without loopholes.
Janey
@Anonymous You could try using the PATH function in DAX for some of this, to create Level 1, Level 2, etc columns.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
122 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
189 | |
96 | |
67 | |
63 | |
53 |