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
Anonymous
Not applicable

Create a Calculated Column from Different Tables

Hi,

 

I have two table (alot more but ill use two).

 

In my ad details table 'addetails' I have a column called 'adqinstr' in there I have mulitple rows with either "Private", "Trade", or "Bus Acc".

In my customer table 'custAcc'  I have created a cacluated column where i want to say if find "Buss  Acc" then set it to "BA" else put "normal".

 

None of the DAX functions seem to be available (no list appears) and the useful columns only seem to show the columns for that table.

 

Thanks

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

@Anonymous

 

According to the table relationship shortcut you provided above, there is a One to Many relationship between table "custAcc" ant table "adDetails", and table "custAcc" is on the one side of the relationship. In this scenario, you should use RELATEDTABLE function to create the calculated column for table "custAcc".

 

The formula below is for your reference.

Column =
IF (
    CONTAINS ( RELATEDTABLE ( adDetails ), adDetails[adqinstr], "Bus Acc" ),
    "BA",
    "Normal"
)

 Regards

View solution in original post

13 REPLIES 13

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.