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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
GoingIncognito
Advocate III
Advocate III

nextday function not working with edate and eomonth functions

I was reading through SQLBI instruction that had a line:  NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( Calendar[FullDate] ) ) )

So being unimaginitive, as I am, I tried NEXTDAY ( EDATE( LASTDATE(fact[date]), -13 ) ) ) and  NEXTDAY ( EOMONTH( LASTDATE(fact[date]), -13 ) ) ). By taking out nextday I get a result, but with Nextday() I get a "A function 'LASTDATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed." Why do I get this? Why isn't nextday() allowed? 

1 ACCEPTED SOLUTION

@GoingIncognito 

EDATE https://docs.microsoft.com/en-us/dax/edate-function-dax or EOMONTH https://docs.microsoft.com/en-us/dax/eomonth-function-dax returns the DATE. well. like a string in text format

but for NEXTDAY https://docs.microsoft.com/en-us/dax/nextday-function-dax input is A column containing dates. 

It is not so clear but there is a difference

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
az38
Community Champion
Community Champion

hi @GoingIncognito 

maybe that will be enough?

Column = Edate(lastdate(fact[date]),-13)+1

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

That's what I did. But didn't come with a better place to ask, why doesn't nextday() work here? I would like to know, out of curiosity. Thank you for your reply!

@GoingIncognito 

EDATE https://docs.microsoft.com/en-us/dax/edate-function-dax or EOMONTH https://docs.microsoft.com/en-us/dax/eomonth-function-dax returns the DATE. well. like a string in text format

but for NEXTDAY https://docs.microsoft.com/en-us/dax/nextday-function-dax input is A column containing dates. 

It is not so clear but there is a difference

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors