Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a Sharepoint list that I am creating a PBI report for. This sharepoint list will have one or more IDs for an approval workflow.
I want to show who the Approval request went to using the Approval Ids. I have used the lookup and it works when there is only one user, but it does not work when there are multiple IDs to look up.
Solved! Go to Solution.
Thanks for your assistance, but I found a different solution. AssignedTo is also found under FieldValuesAsText. I selected the fields I needed and it is already available. No function needed.
Hello there @lopezbec ! The search values need to ideally be scalar. You should split the column in power query to then do the LOOKUP, but you can try the following:
Approval Sent To =
IF (
IFERROR ( SEARCH ( ",", [ApprovalSentToId] ), -1 ) >= 0,
LEFT ( RELATED ( 'User Information List'[Title] ), 3 ),
LEFT ( RELATED ( 'User Information List'[Title] ), 3 ) & ", "
& RIGHT ( RELATED ( 'User Information List'[Title] ), 3 )
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
This did not work, when there is only one approver name it splits the name with a comma.
Can you give me more information on how to split the column?
@lopezbec my bad, try this:
Approval Sent To =
IF (
IFERROR ( SEARCH ( ",", [ApprovalSentToId] ), -1 ) > 0,
LEFT ( RELATED ( 'User Information List'[Title] ), 3 ),
LEFT ( RELATED ( 'User Information List'[Title] ), 3 ) & ", "
& RIGHT ( RELATED ( 'User Information List'[Title] ), 3 )
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
If I do not have a relationship between the tables, I get this error:
I created a relationship with ApprovalSentToID as well as FinalApproverID to ID in the User Information List
It then works, but I get the same results and it is not pulling in anything for both approvers. The second row should have 2 approver names.
Here is what the data looks like:
ApprovalSentToID:
User table:
I changed the number from 3 to 15 and I get these results
Now it shows the full name, but when there is a single approver, it lists it twice. When there is multiple, still nothing.
Another Comment, I don't think I can split the columns, because I will not know if there is one approver, or 10, the approver list is dynamic based upon another list for Department in SharePoint.
Could you try this then?
Approval Sent To =
IF (
IFERROR ( SEARCH ( ",", [ApprovalSentToId] ), -1 ) >= 0,
LEFT ( RELATED ( 'User Information List'[Title] ), 3 ) & ", "
& RIGHT ( RELATED ( 'User Information List'[Title] ), 3 ),
LEFT ( RELATED ( 'User Information List'[Title] ), 3 )
)
Thanks for your assistance, but I found a different solution. AssignedTo is also found under FieldValuesAsText. I selected the fields I needed and it is already available. No function needed.
Hi,
Is there a reason you can't have and active relationship between the tables (if so you can use passive + USERELATIONSHIP)?
End result:
Ping me with @ if you have questions
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
I am new to PowerBI. I use the user table for both the ApproverSentToId as well as the FinalApproverID to get the names for the report. For the ApproverSentToID there could be 1 to many. The FinalApproverID has only one user. I am not sure what you mean by using the "passive + USERELATIONSHIP)".
Hi,
I meant that if you can't have an active relationship (like the one in my example) between the tables. You can create an inactive relationship and use USERELATIONSHIP function within CALCULATE to activate the relationship and combined this with variables to get the values you desire. However, I would recommend first trying to create an active relationship.
Proud to be a Super User!
I have created an active relationship, but I do not understand how what you have above works, my ApprovalSentToID column will have 1 to many ids separated by commas. I do not know if there will be one or 10 approver IDs in that field. Can you provide the measure text of what you used?