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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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