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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
romovaro
Responsive Resident
Responsive Resident

If several fields match, then provide Date

HI

 

I am having issues getting this right.

 

I have a table (table1) with columns

- CLient Name

- CID

- Country

- Go Live Date

 

And another table (table2) with the same columns

- Client Name

- CID

- COuntry

- Go Live Date (date format)

 

what I am trying to achieve is that

 

IF CID and Country is equal in both tables, then return the "Go Live date" from Table2

 

Thanks,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @romovaro 

 

Thanks for the reply from ryan_mayu .

 

My sample:

 

Table1

vxuxinyimsft_4-1736920728027.png

 

Table2

vxuxinyimsft_5-1736920822661.png

 

You can also try to create a calculated column or measure using LOOKUPVALUE.

 

A calculated column:

Result = 
LOOKUPVALUE(
    Table2[Go Live Date (date format)],
    Table2[CID], Table1[CID],
    Table2[Country], Table1[Country]
)

 

Or a measure:

Result1 = 
LOOKUPVALUE(
    Table2[Go Live Date (date format)],
    Table2[CID], MAX(Table1[CID]),
    Table2[Country], MAX(Table1[Country])
)

 

Output:

vxuxinyimsft_3-1736920685421.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @romovaro 

 

Thanks for the reply from ryan_mayu .

 

My sample:

 

Table1

vxuxinyimsft_4-1736920728027.png

 

Table2

vxuxinyimsft_5-1736920822661.png

 

You can also try to create a calculated column or measure using LOOKUPVALUE.

 

A calculated column:

Result = 
LOOKUPVALUE(
    Table2[Go Live Date (date format)],
    Table2[CID], Table1[CID],
    Table2[Country], Table1[Country]
)

 

Or a measure:

Result1 = 
LOOKUPVALUE(
    Table2[Go Live Date (date format)],
    Table2[CID], MAX(Table1[CID]),
    Table2[Country], MAX(Table1[Country])
)

 

Output:

vxuxinyimsft_3-1736920685421.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@romovaro 

you can merge tables in PQ

 

press ctrl and select CID and Country column, then you will see numbers beside the column. Do the same in the table2.

 

11.PNG22.PNG

 

or you can use DAX to get the date

 

Column = maxx(FILTER('Table (2)','Table'[CID]='Table (2)'[CID]&&'Table'[Country]='Table (2)'[Country]),'Table (2)'[golivedate])
12.PNG
 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.