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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Conditional Comparing tables

Hi guys!

 

I need to compare two diffent tables (more than 6mi rows each one) with conditionals. like a VLOOKUP + IF function or more specifically, index + match in excel.

 

In table 1, i need to figure out if exists in table 2 and if so, how many days are between each one (there's a date column) - I need only the diference <= 30 days. But i can have the same ID more than once with differents dates. 

 

Thanks!!!

 

 

 

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

Sounds like Merge Queries.

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-shape-and-combine-data#combine-queries

Better to share some sample data and expected result to us.

 

Best Regards,

Jay

parry2k
Super User
Super User

@Anonymous please provide sample data. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi,

 

sorry, my bad!

 

here's a sample data. The situation is like:

1) Step1 - Everyday, I send an e-mail to customers about outstading payments.

2) Step2 - Everyday, i check all the payments we've received and compare to our list in step 1 (ID_CLIENT in  step 2might be in step1 or not)

 

Table C = Notifications E-mail

Table R = Payments

 

tables.JPG

 

 

 

 

Trying to solve it, in table R i've checked if CLIENT_ID in table R exists in table C:

vlookupvalue.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

now, I'm trying to have something like:

if column vlookup = X, go to table C and get the latest date considering the column DATE in table R (in table C, i can have the same ID_CLIENT more than once -- with differents dates)

 

Thanks!!

 

 

 

 

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.