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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
TotunG
Resolver I
Resolver I

Fixing Filter Measure

Hi all,

 

I'm trying to use the below measure to lookup a value in a table where I have a unique code 

 

VAR Selected_Date = 'Table1'[Date]

RETURN

LOOKUPVALUE

(

FILTER('Table1', Selected_Date = 'Table1'[Date]),

'Table1'[Numbers],

'Table1'[Unique Code],

'Table2'[Unique Code]

)

 

Any ideas why this isn't working?

4 REPLIES 4
VigneshSub
New Member

Hi,

Please use min/max date in the variable, if you are using measure then this would dynamically filter to the selected period

VAR Selected_Date = MAX('Table2'[Date])

RETURN

LOOKUPVALUE(table1[value] , table1[date] , Selected_Date ,table1[uniqueid] , table2[uniqueid])

It doesn't let me reference table1[value] in this. It only lets me reference Table2 columns or the relationship table the code's are linked by. 

amitchandak
Super User
Super User

@TotunG ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

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

I have a table like below:

 

IDMonthCalculated Column
SASDSK2JANERROR
SFAFACFEB

ERROR

SDADSFA5APRILERROR
SFAFA4MARERROR

 

The calculated column is trying to LOOKUP the value that is found in another table (seen below), but obviously this table has multiple 'Years' in it so it will find multiple values. Therefore I need it to interact with a 'Year' slicer or FILTER the table by a 'YEAR' so it only finds the 1 ID per 1 year. It can be converted into a measure which I think is easier but none of my formulas are working.

IDValue NeededYear 
SASDSK252022
SASDSK262019
SDADSFA522022
SDADSFA552021
SDADSFA56

2020

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.