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
atpbi10
Helper I
Helper I

Creating new column based on values from values from two other tables

I have three tables with this relationship:

halp.PNG

I want to create a new column/measure that I can use to filter my visuals later, which basically takes two columns, one from `Main` table and one from `MappingUtil`. 

So basically I want to filter out rows where the corresponding columns from `Main` and `MappingUtil` are equal. I tried using this to create new column in `Sheet1` table:

 

 

CorrectFloor = 
IF (
    RELATED ('Main'[Assigned Floor]) = RELATED ( 'MappingUtil'[Floor] ),
    "Correct",
    "Incorrect"
)

 

 

 

However Im getting error:

 

The column 'Main[Assigned Floor]' either doesn't exist or doesn't have a relationship to any table available in the current context

 

 

 

But as you can see in the model above it they are both linked to `Sheet1` table. What am I doing wrong?

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @atpbi10 ,

 

Could you please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business after removing sensitive data?😀

 

Best Regards,
Eyelyn Qin

lbendlin
Super User
Super User

that is incorrect. You can influence the connection type and the search direction.  Also check your source data for irregularities (duplicates in columns where you expected unique values)

lbendlin
Super User
Super User

You may want to read up on some of the fundamentals of Power BI, especially the application of star schemas. Please rethink the relationships between your tables.

Hey thanks for the reply. I had no choice in how those relationships were applied, powerbi locked them in and does not allow to change.

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.