Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Referencing two columns from separate data sources in DAX



I am trying to create a column that uses columns from seperate data sources (One being an excel file and the other being SQL).


For example:
New Column = IF( Data1[value1] = 1, Data2[value2]/1000, Data2[value2])

Is this possible? Or is there another method?

Solution Sage
Solution Sage

Hey @conorl 


You can certainly do this and you are on the right track. However, since you are in Power BI and not excel it is a little different. You can't make row references so you will end up needing to use the FILTER or LOOKUP functions in Power BI (much like Vlookups in excel) to find the related value2 in data2.

Memorable Member
Memorable Member



It is possible..


Please post the sample inputs, how you want to define relationships and expected output to better answer you.



Connect on LinkedIn
Not applicable

First load excel data using get data amd excel source.
Then again click on get data and connect to sql server and load data.

If you want new column excel data that is in data1 table then first you need create relationship between these two table and write down your new column dax as per your requirement.

If it resolves your problem mark it as a solution and give Kudos.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.