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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
matthewhaggett
Regular Visitor

Lookup based on 2 criteria

Hello

 

I have a problem that I am trying to solve and cannot get it sorted currently

 

I have a table of data from Azure Devops which includes history for every item in the system.  This data has multiple lines with the same Work ID each of which has a Date field which states when the history was taken. 

 

I have created a new table that has just the unique work IDs and I want to bring through one of the other fields in the main table based on the workID and also the Date field (So a lookup with 2 criteria) but the Date field will be controlled by a slicer and I cannot work out how to create this

 

Data exampleData exampleResult in second table if March 2019 is selectedResult in second table if March 2019 is selected

1 ACCEPTED SOLUTION
Anonymous
Not applicable

try this measure:

Measure = 
IF ( HASONEVALUE(Table1[Info]),
CALCULATE(
    VALUES( Table1[Info]),
    CALCULATETABLE(
        Table1,
        ALLSELECTED(Table1[Date])
    )
)
)

Calculate Table.png

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Select any date in the slicer.  Drag the Work Item ID and Info field to the Table visual.


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

try this measure:

Measure = 
IF ( HASONEVALUE(Table1[Info]),
CALCULATE(
    VALUES( Table1[Info]),
    CALCULATETABLE(
        Table1,
        ALLSELECTED(Table1[Date])
    )
)
)

Calculate Table.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors