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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

Compare Values in Column Between Two Tables - Help with DAX Expression

I would like to write a DAX statement that compares the values of a column in Table A to a column in Table B.

 

Table A has unique values

Table B has duplicate values because the data represented is daily performance

 

Rough expression of the logic:

 

If the Transation ID in Column X of Table A matches a Transaction ID in Column Y of Table B, True else False.

 

Thanks! 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous

 

Try this 

 

New column = IF ( TableX[TrnsactionID] = RELATED( TableY[TransactionID]), TRUE(),FALSE() )

 

Thanks
Raj

Anonymous
Not applicable

@Anonymous

 

I used this logic based on your recommendation:

 

Column = IF(Inv[UID]=RELATED(Sheet1[UID]),"Sold","Available")

 

The output in thge table view looks like this:

 

Capture.JPG

 

However, when I am in the Data View the column shows Available and Sold.  I can't figure out why I can't show "Available" on my table visualiizaiton.

 

Capture.JPG

Hi @Anonymous,

Could you please share a sample data to have a test and post your desired result if possible?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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