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

Calculated column comparing values between tables with a 1 to many relationship

Hey guys,

 

I am having trouble creating a calculated column that compares values between two tables with a 1 to many relationship and a filtered date. 

 

I have an ACCOUNTS table that contains the column Account Number as a unique key. I have another table called DUE-DILIGENCE

that contains the column of Account Number(non-unique) and a Date Column. The relationship between these tables is 1 to many with Account Number as the key. 

 

Now in my dashboard I have a table that has all Account Numbers as a column as seen below, and I would like to add another column identifying with a yes/no those that are also found in the DUE-DILIGENCE for the specific month and year that the user selects in a slicer. Let me know any suggestions on how I could do this. 

is DD.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks!

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Measure = COUNTROWS(RELATEDTABLE('DUE-DILIGENCE')

 

Filter on that measure not blank.

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Measure = COUNTROWS(RELATEDTABLE('DUE-DILIGENCE')

 

Filter on that measure not blank.

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for the solution. I created the measure that you suggested and then used it on a calculated column as follows

 

DD = if([Measure] = BLANK(), "No", "Yes")

 

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.