Forum Discussion
Lookup values (in DirectQuery)
Just an update: perhaps my description was too wordy, but in a nutshell I need to lookup values from my Account table into my Fact table (Fact table being the many side of the many-to-one relationship).
Lookupvalue DAX does not work as I'm working in the DirectQuery mode. All the posts I searched for had cases where people were working in the Import mode.
- v-caliao-msft9 years agoMicrosoft Employee
Ged,
You could use RELATED function to get a related value from another table.
Reference
https://msdn.microsoft.com/en-us/library/ee634202.aspx
Regards,
Charlie Liao
- Ged9 years agoHelper I
Thank you Charlie. Appreciate it.
I had tried RELATED before by trying to add a Custom Column in the Query Editor. However, I received this error:
Expression.Error: The name 'RELATED' wasn't recognized. Make sure it's spelled correctly.
Expression was:
= Table.AddColumn(#"Added Custom", "Custom", each RELATED(Account_Code_ACCF[SUMSIGN]))
I tried adding apostrophes around the table name. No breakthrough though. I am new in Power BI.
Would you please tell me the difference between adding a New Column in the Report view and adding a Custom Column in the Query Editor?
I sorted my question by creating and using an inner join statement to import a new table via Direct Query.
Is that an accepted practise? I'm thinking whether I should expect any issues , e.g. re performance.
Thank you again,
Ged
- Bone4 years agoFrequent Visitor
Did you ever figure this out? I am in the same boat. I have a lookup table import and a direct query but the lookup won't work.