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

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

Reply
Anonymous
Not applicable

Look up a value based on three matching conditions with another table

I have two tables: 

table 1 has client name, purchase date, product, sales rep

table 2 has client name, contact date, sales rep

The relationship is built through a factor table of "client name". Other factor tables are "Date "table, "Sales Rep" table.

 

I tried to retrieve the information that shows the client names who have made purchases at a time period (controlled by the Date slicer) and whether these clients are contacted by their designated sales reps in the past year.  The information needs to be filtered  by a date slicer and a sales rep slicer.  I've tried "Calculatetable (table 1, keepfilters(table 1[client name] in values(table2[client name]), keepfilters(values(table1[sales rep])). This wouldn't work itself. I also don't know how to expand the search time period to a year from today and not impacted by the Date slicer. Can anyone please help? Thanks so much!

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,
Eyelyn Qin

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on this: I also don't know how to expand the search time period to a year from today and not impacted by the Date slicer. 

 

It looks like you need a Date table for slicer that has no relationship to the other tables. For example:

Date period of last year = 
IF(MAX('Table'[Date])  >= MIN('Dates for slicer'[Date])-365 && MAX('Table'[Date])<= MAX('Dates for slicer'[Date])-365,1,0)

Eyelyn9_0-1658284064809.png

 

So as @lbendlin suggested, please provide me with more details about your table and your problem to help us clarify your scenario. Or share me with your pbix file after removing sensitive data.

Refer to:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

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

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.