Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
conorl
Frequent Visitor

Referencing two columns from separate data sources in DAX

Hi,

 

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?

3 REPLIES 3
Tad17
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.

VasTg
Memorable Member
Memorable Member

@conorl 

 

It is possible..

 

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

 

 

Connect on LinkedIn
Anonymous
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.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors