Forum Discussion
arvindyadav
9 years agoPost Partisan
Count Of Days In Month.
Hi All, I need to count no of days in given month. i.e, How can I make a column or measure that will automatically go to the calendar of 2016 and input the number of days in the month. So basic...
- 9 years ago
Hi ,
DaysInMonthColumn=SWITCH(MONTH([Date]), 1, 31, 2, 29, 3, 31, 4, 30 , 5, 31, 6, 30, 7, 31, 8, 31 , 9, 30, 10, 31, 11, 30, 12, 31 , BLANK() )The above formula is useful for me . I also want no of days in 5 months . So how can I add those number.
Regards,
Arvind
- 9 years ago
Hi arvindyadav,
Would you like to try this formula as a calculated column?
DaysInMonth = DAY ( EOMONTH ( [Date], 0 ) )
Best Regards!
Dale
arvindyadav
9 years agoPost Partisan
Hi ,
DaysInMonthColumn=SWITCH(MONTH([Date]), 1, 31, 2, 29, 3, 31, 4, 30
, 5, 31, 6, 30, 7, 31, 8, 31
, 9, 30, 10, 31, 11, 30, 12, 31
, BLANK() ) The above formula is useful for me . I also want no of days in 5 months . So how can I add those number.
Regards,
Arvind
v-jiascu-msft
9 years agoMicrosoft Employee
Hi arvindyadav,
Would you like to try this formula as a calculated column?
DaysInMonth = DAY ( EOMONTH ( [Date], 0 ) )
Best Regards!
Dale
- arvindyadav9 years agoPost Partisan
Hi Dale,
Thanks.
Reagrds,
Arvind
- v-jiascu-msft9 years agoMicrosoft Employee
Hi arvindyadav,
Could you please mark the proper answer as solution if it's convenient for you? That will be a help to the others.
Best Regards!
Dale