cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors