Reply
Highlighted
Frequent Visitor
Posts: 15
Registered: ‎02-02-2018

Vlookup in PowerBI?

Hi!

 

I'm working on a report that is combining a few different Salesforce objects, but creating a relationship in PowerBI is not giving me the results I need for one of the tables. 

 

In the incident report table, there's 3 columns that have a name entered for them. The name appears here as the reference id to the individual. Each individual has their own unique id, so for another report I can link the id from the report to the name from the student record and everything is fine. However, when I linked the id to the 3 name fields here, I'm not able to display the names for two of the fields. The "Name" from Student only shows the name for Student_Name__c. I also need the names of the inviduals from Student_Involved_2__c and Student_Involved_3__c to show in the table, but if I use those as values, only the reference id appears. I've attached 2 screenshots below:

 

powerbi.PNGpowerbi 2.PNG

 

Is there a way to create a column that will use the reference id as a lookup to have the name entered instead?

 

Thanks in advance for any help! Smiley Happy

 

Senior Member
Posts: 380
Registered: ‎07-01-2015

Re: Vlookup in PowerBI?

No vlookup, and thank goodness it's not required Smiley Happy

 

What is going to help folks is a screen shots of your Relationships view on the main power bi window.

Frequent Visitor
Posts: 15
Registered: ‎02-02-2018

Re: Vlookup in PowerBI?

powerbi 3.PNGpowerbi 4.PNG

Here are two screenshots (Just realized two of those relationships can't be activated. Let me know what else helps. 

Senior Member
Posts: 380
Registered: ‎07-01-2015

Re: Vlookup in PowerBI?

Ya, the error you see there is exactly right.   You can't have multiple active relationship paths between two tables.  So, if an incident report as StudentA, StudentB, and the ResidentAssistant Id's... only 1 of those will be "active"... and you will have to do a bit of extra work when writing measurs to "activate" them (via USERELATIONSHIP( ) api)

 

Sepearately, models tend to be easier to understand using just 1 to many relationships (which you have) and avoid bi-directional relationships (which you have 1 between student and incident report).

 

To get heading in the right direction, I would probably remove 2 of the relationships between student and incident report (leaving just the most important relationship).

 

Next step you can add back an inactive relationship and learn about USERELATIONSHIP to "activate" it... or you may end up duplicating your student table, so that you can have 2 active relationships (1 to each).