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
MHatMFT
Frequent Visitor

Column that returns true when a related table contains a specific value in a column

I have a table of sales order data, and a second, linked table that contains information about communications with customers in relation to the sales orders. The second table has a column called "category". What I would like to do is add a column to the sales data table that flags true if there is a note in the second table with a specific category. Is this doable?

 

There will be other categories in the second table that need to be ignored, and there may be more than one note tagged as the category I want to look for.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You can add a calculated column something like

Has note on category = NOT( ISEMPTY( 
FILTER( RELATEDTABLE( Notes ), Notes[Category] IN { "category 1", "category 2" } )
))

View solution in original post

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

Hi @MHatMFT ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @MHatMFT ,

 

Yes, you could do that.

But we need more details about your table and your expected output to clarify your scenario.

Could you please provide some dummy data or share with your pbix file after removing sensitive data?

 

For reference:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

How to Get Your Question Answered Quickly - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin

johnt75
Super User
Super User

You can add a calculated column something like

Has note on category = NOT( ISEMPTY( 
FILTER( RELATEDTABLE( Notes ), Notes[Category] IN { "category 1", "category 2" } )
))

Thanks, that worked

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.