Forum Discussion

GoingIncognito's avatar
GoingIncognito
Icon for Advocate III rankAdvocate III
6 years ago
Solved

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? 

3 Replies