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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
DevadathanK
Resolver I
Resolver I

Writing LOOKUPVALUE Using CALCULATE

Hello Community!

<Message removed>

Thanks for any help!

3 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

Use MAXX(FILTER(...)...) instead of LOOKUPVALUE for your situation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

amitchandak
Super User
Super User

@DevadathanK , you can try these kind of options

Across table data movement with filter

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])
New Column = maxx(filter(table1,table1[Col1]= earlier(table1[col1]) && table1[Col1]= earlier(table1[col2]) ),table1[required_col])

 

Inside same table get the values

maxx(filter(table,table[Indicator no]=earlier(table[Indicator no]) && table[code]=earlier(table[code])
&& table[Qtr No] =(earlier(table[Qtr No])-1)),table[Actual])

 

With date

countx(filter(table,table[sub]=earlier(table[sub]) && table[BG]=earlier(table[BG]) && table[DIV]=earlier(table[DIV])
&& table[period]=earlier(table[period]) && table[updated]<=earlier(table[updated])),table[updated])

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

View solution in original post

DevadathanK
Resolver I
Resolver I

I used CALCULATE to modify the functionality of LOOKUPVALUE

 

https://community.powerbi.com/t5/Desktop/Unable-to-create-a-column-by-looking-up-values-in-a-another...

 

Please refer the above link!

View solution in original post

3 REPLIES 3
DevadathanK
Resolver I
Resolver I

I used CALCULATE to modify the functionality of LOOKUPVALUE

 

https://community.powerbi.com/t5/Desktop/Unable-to-create-a-column-by-looking-up-values-in-a-another...

 

Please refer the above link!

amitchandak
Super User
Super User

@DevadathanK , you can try these kind of options

Across table data movement with filter

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])
New Column = maxx(filter(table1,table1[Col1]= earlier(table1[col1]) && table1[Col1]= earlier(table1[col2]) ),table1[required_col])

 

Inside same table get the values

maxx(filter(table,table[Indicator no]=earlier(table[Indicator no]) && table[code]=earlier(table[code])
&& table[Qtr No] =(earlier(table[Qtr No])-1)),table[Actual])

 

With date

countx(filter(table,table[sub]=earlier(table[sub]) && table[BG]=earlier(table[BG]) && table[DIV]=earlier(table[DIV])
&& table[period]=earlier(table[period]) && table[updated]<=earlier(table[updated])),table[updated])

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
Greg_Deckler
Community Champion
Community Champion

Use MAXX(FILTER(...)...) instead of LOOKUPVALUE for your situation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.