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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ntm1275
Regular Visitor

Comparing Latest Dates from Two Different Tables and Returning a value of Yes or No

Each table has a Supplier in it with possible multiple dates in it and I want to write a measure or add a column that compares the dates and if they match return a value of Yes or No if they don't.

Problem I have is that each supplier has possible multiple dates, so I want to compare the latest dates in Table1 with the latest dates in Table2

So an example of what I have in each table is this using DD/MM/YYYY

Table 1

CustomerDate
Tom21/08/2021
Tom13/01/2019
Tom23/04/2017
Jeff04/07/2021
Dave09/10/2021
Dave17/04/2019
Harry11/01/2022

 

Table 2

CustomerDate
Tom13/04/2021
Tom13/01/2019
Jeff04/07/2021
Dave09/10/2021
Dave17/04/2019
Harry26/10/2022

 

So the result would look like this when I use it to create a table visualisation

CustomerTable1 DateTable 2 DateMatch
Tom21/08/202113/04/2021No
Jeff04/07/202104/07/2021Yes
Dave09/10/202109/10/2021Yes
Harry11/01/202226/10/2022No

 

The reason for trying to do this is becasue both tables are being fed from two seperate databases.

Both databases should match, but with user error, quite a lot of them don't and I'm looking for an easy way to display this in a table visualisation so that both users of each database can view the table visualisation and can clearly see by the 'No', which dates they have entered incorrectly.

 

Many thanks for your help

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @ntm1275 
Here is a sample file with the solution https://www.dropbox.com/t/7I9C0OMjOQrZMbhu

The simplest method is to have a common filter table that contans all the unique Costomer Names and create a a relationship with the the two tables. The rest is simple

Table1 Max Date = MAX ( Table1[Date] )
Table2 Max Date = MAX ( Table2[Date] )
Match = IF ( [Table1 Max Date] = [Table2 Max Date], "Yes", "No" )

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @ntm1275 
Here is a sample file with the solution https://www.dropbox.com/t/7I9C0OMjOQrZMbhu

The simplest method is to have a common filter table that contans all the unique Costomer Names and create a a relationship with the the two tables. The rest is simple

Table1 Max Date = MAX ( Table1[Date] )
Table2 Max Date = MAX ( Table2[Date] )
Match = IF ( [Table1 Max Date] = [Table2 Max Date], "Yes", "No" )
amitchandak
Super User
Super User

@ntm1275 , In both table, you can get latest value using

https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

or

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

 

Create a common Customer table and plot data against it

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.