Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello All,
I am using the Lookupvalue function for the first time.
I am trying to find out the values in a way that,
I have table as below.
Employee Name | Supervisor | Project Manager | Delivery Manager Name |
Meeta Jangde | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Prashant Pandey | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Abhijeet Behare | Venkat Reddy | Vijay Venkatachalam | Manoj Mone |
Abhijeet Behare | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Prithviraj Sawant | Venkat Reddy | Vijay Venkatachalam | Manoj Mone |
Maulik Patil | Venkat Reddy | Vijay Venkatachalam | Manoj Mone |
Mohan Vankudoth | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Supriya Dhekale | Venkat Reddy | Manoj Mone | Mandar Marulkar |
SHRADDHA NALKAR | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Radhika Mantri | Venkat Reddy | Manoj Mone | Mandar Marulkar |
Now I would like to get the values as,
For Emp Name--> Meeta Jangde
It should return as,
Meeta Jangde --> Venkat Reddy --> Manoj Mone --> Mandar Marulkar
How can i get it using lookupvalue funtion.
Or is there any way to get it using DAX.
Any help,
Thanks,
Mohan V
Solved! Go to Solution.
Dear @Anonymous, @Abduvali,
Ok, I'll share with step by step:
Path = PATH(Employees[EmployeeName],Employees[ManagerName])
Level 1 = PATHITEM(Employees[Path],1)
Level 2 = PATHITEM(Employees[Path],2)
Level 3 = PATHITEM(Employees[Path],3)
That's it!
If you need some help, don't be hesitate tag my name in your topic. I'll try if i can.
Regards,
ManNVSM.
Great job @Anonymous,
Please share in here if you can, I will very interested in your approach to it!!!
Thanks
@Anonymous I really thank you for this from my bottom of the heart buddy,
I am impressed. Kudos Kudos Kudos.
Ok...Its sad that it is not possible with that amazing visual.
But as you said we can go with that journy chart my MAQ,
so how we can implement this in that chart.
If you did... can you please share the pbix file.
Dear @Anonymous, @Abduvali,
Ok, I'll share with step by step:
Path = PATH(Employees[EmployeeName],Employees[ManagerName])
Level 1 = PATHITEM(Employees[Path],1)
Level 2 = PATHITEM(Employees[Path],2)
Level 3 = PATHITEM(Employees[Path],3)
That's it!
If you need some help, don't be hesitate tag my name in your topic. I'll try if i can.
Regards,
ManNVSM.
@Anonymous Sure buddy...
You are really awsome..
Really great job..
Will come back once i try it in my report..
Thank a lotttttttttttttt........
So much of respect.
@AnonymousSure buddy.
Hope you can solve it and have fun! Remember Accept Solution
Regards,
ManNVSM.
@Anonymous You been great and i hope you will continue with this.
Sorry to say that the solution you have povided with journey chart by MAQ, i cant use that buddy.
It is not the thing that i am looking for, and i think you know it very well.
Well, I have another thing to do,
I hope you help me with this.
Now if you observe this below image.
Now what i would like to show here is,
I want Pro id as a center point of contact, and CEO, QC, PC, DM, PM will be his childs, and then developers should come under PM as you can see that Developers Man ID's are only having single ID i.e 5(PM)
I did written this dax using lookupvalue,
ProMan Name = LOOKUPVALUE(Table1[ProID],Table1[ID],Table1[ProID])
It given me output as
Here the center one is Pro ID, and the rest are all the Emp ID as child ones.
But how can i get those developers under PM as sub childs.
I hope you will help me with this.
I will be waiting for your reply buddy.
I think its better to change the question name
Dear @Anonymous,
I'm back.
Is it your expect?
Btw, please send me your pbix with sample data 🙂
Regards,
ManNVSM.
@Anonymous Yes buddy...
But i think i cant send file through this community.
@Anonymous Thanks for your efforts.
Iam very thankful for your valuable time on this.
But as I MENTIONED IN MY PREVIOUS COMMENTS, that i am using this calculated colum values in
Social Network Graph, So that i Can show each employees Upperlevel and Lowerlevel hierarchy, and which is not going to be possible with the calculated table because i cant use this table values.
If i want to then again i have write the same LOOKUPVALUE function dax which leads me to the same current situation.
Please help me.
@Anonymous,
Just add a calculated table directly.
@v-chuncz-msft yes. I can add a calculated table and is giving me the perfect values but IN MULTIPLE COLUMNS.
As i mentioned in privious comments, i am trying to use this CALCULATED COLUMN in the visual of SOCIAL NETWORK GRAPH which will take ONLY COLUMN VALUES in the SOURCE FILED.
SO IF I WRITE THIS CALCULATED TABLE ALSO again i need to write the LOOKUPVALUE function which leads me to the same current situation.
Please Help
@Anonymous,
LOOKUPVALUE Function is not necessary. It is just used to get the name. You need to construct the table including two columns source and target based on the hierarchy.
Exactly @v-chuncz-msft.
Thats what im trying to do.
I need to get the complete upper level and lower level hierarchy.
Can you please give a hint for that.
So what about:
Table 2 = SUMMARIZECOLUMNS(Employees[Supervisor],Employees[Project Manager],Employees[Deliver Manager Name],FILTER(Employees,[Employee Name]="Meeta Jangde"))
How are you trying to actually use this? Is it in some kind of visual or in some other calculation? That is going to drive the solution.
@Greg_Deckler I am very thankful for your help.
I tried what you have suggested. It works fine.
Then i tried to make it dynamic, like i choose values from a slicer.
So i tried the below dax
Table 2 = SUMMARIZECOLUMNS(Sheet3[Supervisor],Sheet3[Project Manager],Sheet3[Delivery Manager Name],FILTER(Sheet3,SELECTEDVALUE(Sheet3[ Employee Name]))
)
But i got all the null values. i didnt get any output.
Any suggestions.
@Greg_Deckler Actually, what exactly that i am trying to do is,
I am trying to show the hierarchial employees for the table that i have attached using
Social Network graph and i am trying to refer the sample which is availble here.
https://store.office.com/powerbiaddininstallpage.aspx?rs=en-US&assetid=WA104381236
In this sample, there in source name they have used a calculated column with function LOOKUPVALUES, where it is returning the names.
Like wise i would like to show in this visual, for a employee, it should show me the upper hierarchy i.e. project manager, delivery manager and supervisor, and as well as the employees at same level.
is it possible?
if it is please help to try this.
Im really sorry for the wrong lead.
@Anonymous,
You may right click [Employee Name] column and select Unpivot Other Columns in Query Editor.
So how do you want that returned? In a table, a list of values?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
86 | |
84 | |
68 | |
49 |
User | Count |
---|---|
138 | |
111 | |
103 | |
64 | |
60 |