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
extri13
Helper I
Helper I

[Basic Question] EARLIER/EARLIEST refers to an earlier row context which doesn't exist

Dear BI users,

 

I can not see EARLIER function working rightly (like below captured image).

Could you please tell me my wrong on the use of EARLIER?

 

Actually, I am creating MoM measures following below article.

However, I found everytime the error message whenever any use of EARLIER function.

 

So, I just made a very simple measure and it also show the same error message

even the simple measure is just a example of an article

 

Measure and error of EARLIER functionMeasure and error of EARLIER function

 

Sincerely,

 

Lee, Hong Gwoo

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@extri13

 

As BhaveshPatel said, EARLIER and EARLIEST are usually used in calculated column. I’d like to recommend this article to you. It should be able to make you understand them more clearly.

 

And EARLIER can also be used in DAX measure in some situations. You can take a look at this article.

 

Best Regards,

Herbert

View solution in original post

3 REPLIES 3
v-haibl-msft
Microsoft Employee
Microsoft Employee

@extri13

 

As BhaveshPatel said, EARLIER and EARLIEST are usually used in calculated column. I’d like to recommend this article to you. It should be able to make you understand them more clearly.

 

And EARLIER can also be used in DAX measure in some situations. You can take a look at this article.

 

Best Regards,

Herbert

Thank you Herbert,

 

Yes it can be used in DAX Measures too but In that specific case, It was supposed to be used for calculated column.

 

Regards

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
BhaveshPatel
Community Champion
Community Champion

Hi

 

It seems to me that instead of creating a calculated column, you are creating a measure. 

 

To Create a Calculated Column, 

 

Go to the Table and Right Click, Select New Column and Put the same syntax in there.

 

This will give you the right results.

 

Regards,

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.