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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
alisaigar
New Member

lookupvalue but with multiple results

Hi all

I need some help on PowerBI

Im trying to lookup a value from another table, except that other table has multiple rows with the same value that im looking up.

This ofcourse results in an error.

Each row has a 'createdon' date, so I thought it would be best to lookup the row with the earliest 'createdon' date.

So in short, i need a lookupvalue [or a summarize formula] which will lookup the 'customerid_account.name' column within the 'opportunity' table, and return the most recent 'statuscode' (also from within the opportunity table)

I hope this is clear. Ive tried various options but I cant seem to get it.

Thanks in advance
Ali

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @alisaigar ,

Actually, in your scenario, we can use the TOPN() function to get the the most recent 'statuscode' for each customerid_account.name, for more information, please refer to this document: https://docs.microsoft.com/en-us/dax/topn-function-dax

Best Regards,

Teige

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors