Forum Discussion
skdas
8 years agoNew Member
startofmonth & FirstDate function Issue
Hi All, I was trying to get the first date from a date field or you can say a measure is having a date from which I was trying to get the first date . E.g. the measure is consisting 03-23-2017 , the...
- 8 years ago
Just to put it briefly
StartofMonth, EndofMonth, FirstDate return the first date/last date in the "Date Column" which they take as argument.
Not the first date/last date of the month
Eric_Zhang
8 years agoMicrosoft Employee
You can reference the online documentation. They have different actually funtionality.
measureFirstDate = CALCULATE(SUM(Table1[value]),FIRSTDATE(Table1[date])) measureLastDate = CALCULATE(SUM(Table1[value]),LASTDATE(Table1[date]))
startofmo = STARTOFMONTH(Table1[date])
To get the 1st day of a given date, eg in your case, you can apply EOMONTH or
Measure = DATE(YEAR([yourMeasure]),MONTH([yourMeasure]),1)
- Zubair_Muhammad8 years agoCommunity Champion
Just to put it briefly
StartofMonth, EndofMonth, FirstDate return the first date/last date in the "Date Column" which they take as argument.
Not the first date/last date of the month