Forum Discussion
smokeyjoe03
3 years agoFrequent Visitor
Strange DATE Function Behaviour
Hi all, looking for a sanity check and hopefully an explanation on the below. I have a Date table with: Column Name (Column Type) Date (Date) Year (Whole Number) MonthOfYear (Whole Number) ...
FreemanZ
3 years agoSuper User
Hi smokeyjoe03
DAY might not accept an expression, but Date value only.
If you are trying to get last day of the previous month, you may try this:
New Column = EOMONTH ( 'Date'[Date], -1 )
smokeyjoe03
3 years agoFrequent Visitor
Hi FreemanZ , thanks for the reply.
As I explained in the original post, I've already tested all 3 arguments seperately to ensure they work. As you can see here:
Which returns:
So DAY definitely accepts expresions.
Thanks for your suggestion, the column I was building was for a different reason which I have since resolved, I'm just looking for an explanation as to why DATE doesn't like the 3 whole number arguments being passed to it.