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
schwadenfeldllc
New Member

EARLIER/EARLIEST refers to an earlier row context which doesn't exist. OLE DB or ODBC error: [Expres

Hi,

 

I was working on new calculcated columns and everything was working fine. Yet after refreshing the data i get this error....
(in powerquery preview its loading perfectly)....

EARLIER/EARLIEST refers to an earlier row context which doesn't exist. OLE DB or ODBC error: [Expression.Error] The key didn't match any rows in the table..


i was trying to integrate an iferror to the calculated column but its not fixing it....now im stuck an cannot refresh the data....and i also dont know exactly where is the error...because even after deleting the calculated column and relationships its still giving me the same error....

index =
IFERROR (
RANKX(
FILTER(
'Products',
'Products'[Parent] = EARLIER('Products'[Parent]) &&
'Products'[Marketplace] = EARLIER('Products'[Marketplace]) &&
'Products'[Targeting] = EARLIER('Products'[Targeting]) &&
'Products'[Campaign state (Informational only)] = EARLIER('Products'[Campaign state (Informational only)])
),
'Products'[Campaign name (Informational only)],
,
DESC,
DENSE
),
// Return blank if error occurs
BLANK()
)

EARLIER/EARLIEST refers to an earlier row context which doesn't exist. OLE DB or ODBC error: [Expression.Error] The key didn't match any rows in the table..


The new data is exactly the same, no columns changed etc....just new numbers....the rest is exatly the same and its also loading in powerquery perfectly.

Also i realised after copy pasting the pbix file....its showing and old deleted calculated column with error....yet in my other files its not there....i think it might be hidden somehow.....anyway to fix it? thank you so much!!


I can still refer to deleted DAX/calculted columns i think this causes the error...

 

Thank you so much!




3 REPLIES 3
Anonymous
Not applicable

Hi @schwadenfeldllc ,

 

This can be due to a number of reasons, I hope this link is useful to you:
excel - how to resolve Power BI error - the key didn't match any rows in the table - Stack Overflow

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

The use of EARLIER is discouraged. Use variables instead.

What you mean exactly? Good it from the YouTube Video here:
https://www.youtube.com/watch?v=qUmTxQHr6nY&t=94s&ab_channel=Curbal

Anyways the EARLIER functions is working fast and perfectely fine.

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.