Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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?
Solved! Go to Solution.
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
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
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!
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
User | Count |
---|---|
97 | |
76 | |
76 | |
47 | |
26 |